Tabnine Logo
HttpRequestFacade.awaitCondition
Code IndexAdd Tabnine to your IDE (free)

How to use
awaitCondition
method
in
lv.ctco.cukes.http.facade.HttpRequestFacade

Best Java code snippets using lv.ctco.cukes.http.facade.HttpRequestFacade.awaitCondition (Showing top 2 results out of 315)

origin: ctco/cukes

public void doRequest(String httpMethod, final String url) throws Exception {
  final HttpMethod method = HttpMethod.parse(httpMethod);
  // TODO: Should be refactored into CukesHttpPlugin
  boolean filterEnabled = world.getBoolean(CukesOptions.LOADRUNNER_FILTER_BLOCKS_REQUESTS);
  AwaitCondition awaitCondition = specification.awaitCondition();
  try {
    if (awaitCondition != null && !filterEnabled) {
      int intervalTime = awaitCondition.getInterval().getValue();
      TimeUnit intervalUnit = awaitCondition.getInterval().getUnitDict().getTimeUnit();
      int waitTime = awaitCondition.getWaitTime().getValue();
      TimeUnit unit = awaitCondition.getWaitTime().getUnitDict().getTimeUnit();
      // TODO Fix
      Awaitility.with().pollInterval(intervalTime, intervalUnit)
        .await()
        .atMost(waitTime, unit)
        .until(doRequest(url, method), new AwaitConditionMatcher(awaitCondition));
    } else {
      doRequest(url, method).call();
    }
  } catch (RuntimeException e) {
    if (!expectException) {
      throw e;
    }
    exception = e;
  }
  specification.initNewSpecification();
}
origin: lv.ctco.cukes/cukes-http

public void doRequest(String httpMethod, final String url) throws Exception {
  final HttpMethod method = HttpMethod.parse(httpMethod);
  // TODO: Should be refactored into CukesHttpPlugin
  boolean filterEnabled = world.getBoolean(CukesOptions.LOADRUNNER_FILTER_BLOCKS_REQUESTS);
  AwaitCondition awaitCondition = specification.awaitCondition();
  try {
    if (awaitCondition != null && !filterEnabled) {
      int intervalTime = awaitCondition.getInterval().getValue();
      TimeUnit intervalUnit = awaitCondition.getInterval().getUnitDict().getTimeUnit();
      int waitTime = awaitCondition.getWaitTime().getValue();
      TimeUnit unit = awaitCondition.getWaitTime().getUnitDict().getTimeUnit();
      // TODO Fix
      Awaitility.with().pollInterval(intervalTime, intervalUnit)
        .await()
        .atMost(waitTime, unit)
        .until(doRequest(url, method), new AwaitConditionMatcher(awaitCondition));
    } else {
      doRequest(url, method).call();
    }
  } catch (RuntimeException e) {
    if (!expectException) {
      throw e;
    }
    exception = e;
  }
  specification.initNewSpecification();
}
lv.ctco.cukes.http.facadeHttpRequestFacadeawaitCondition

Popular methods of HttpRequestFacade

  • value
  • accept
  • authenticationType
  • contentType
  • initNewSpecification
  • authentication
  • baseUri
  • basicAuthentication
  • cookie
  • header
  • onCreate
  • param
  • onCreate,
  • param,
  • proxy,
  • queryParam,
  • sessionId,
  • shouldWaitWithIntervalUntilHeaderEqualToValue,
  • shouldWaitWithIntervalUntilPropertyEqualToValue,
  • shouldWaitWithIntervalUntilStatusCodeReceived

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now