The HTTP condition to wait for during execution.

@deprecated in favor of {@link #http()}
164986
@Deprecated
    public WaitHttpConditionBuilder http(String url) {
        HttpCondition condition = new HttpCondition();
        condition.setUrl(url);
        container.setCondition(condition);
        this.buildAndRun();
        return new WaitHttpConditionBuilder(condition, this);
    }
674883
function waitForReadyOutput() {
      function onCloseBeforeReady(exitCode) {
        done(exitCode && new Error('non-zero exit code ' + exitCode));
      }

      let outputBuffer = '';

      function checkChunkForReady(chunk) {
        outputBuffer += chunk.toString('utf8');

        // ensure the buffer doesn't grow out of control
        if (outputBuffer.length >= opts.readyBufferLength) {
          outputBuffer = outputBuffer.slice(outputBuffer.length - opts.readyBufferLength);
        }

        // don't strip ansi until we check, incase an ansi marker is split across chuncks.
        if (!opts.ready.test(stripAnsi(outputBuffer))) return;

        outputBuffer = '';
        proc.removeListener('close', onCloseBeforeReady);
        proc.stdout.removeListener('data', checkChunkForReady);
        proc.stderr.removeListener('data', checkChunkForReady);
        done();
      }

      proc.on('close', onCloseBeforeReady);
      proc.stdout.on('data', checkChunkForReady);
      proc.stderr.on('data', checkChunkForReady);
    }
700056
private boolean isReady() {
    if (this.status != Status.READY) {
      // e.g. if the node is disabled, it is not ready to run.
      return false;
    }
    for (final Node parent : this.parents) {
      if (!parent.status.isSuccessEffectively()) {
        return false;
      }
    }
    return true;
  }
380473
public boolean waitForExpectedCondition(ExpectedCondition<?> condition, int timeout) {
        WebDriver driver = getWebDriver();
        boolean conditionMet = true;
        try {
            new WebDriverWait(driver, timeout).until(condition);
        } catch (TimeoutException e) {
            conditionMet = false;
        }
        return conditionMet;
    }
1226200
public boolean waitForReady() throws InterruptedException {
        // wait for the framework to be set.
        if (waitForFramework() == null) {
            return false;
        }

        frameworkLaunched.await();
        if (!frameworkLaunchSuccess) {
            return false;
        }

        // Now look for the FrameworkReady service in the service registry
        Collection<ServiceReference<FrameworkReady>> readyServiceRefs;
        try {
            readyServiceRefs = systemBundleCtx.getServiceReferences(FrameworkReady.class, null);
        } catch (InvalidSyntaxException e) {
            throw new IllegalStateException(e); // unlikely.
        } catch (IllegalStateException ex) {
            // The framework might have been stopped before we finished starting
            if (framework.getState() != Bundle.ACTIVE) {
                waitForFrameworkStop();
                return false;
            } else {
                throw ex;
            }
        }

        // If we have any, we will wait for them...
        if (readyServiceRefs != null) {
            for (ServiceReference<FrameworkReady> readyServiceRef : readyServiceRefs) {
                FrameworkReady ready = systemBundleCtx.getService(readyServiceRef);
                if (ready != null) {
                    ready.waitForFrameworkReady();
                }
            }
        }
        // Check if some component declared a fatal start error by initiating
        // framework stop before we were fully started.  If so, wait for the
        // framework to finish stopping, then report an error.
        if (framework.getState() != Bundle.ACTIVE) {
            waitForFrameworkStop();
            return false;
        }

        return true;
    }
646445
public static void waitWhileState(final DeviceProxy proxy, final DevState waitState, final long timeout)
	    throws DevFailed, TimeoutException {
	waitWhileState(proxy, waitState, timeout, 300);
    }
412175
public WaitActionConditionBuilder execution() {
        ActionCondition condition = new ActionCondition();
        container.setCondition(condition);
        containers.push(container);
        return new WaitActionConditionBuilder(container, condition, this);
    }
750882
protected void processRequest() {
        final int timeout = getHTTPContext().getReadTimeout();
        final TCPReadCompletedCallback callback = HttpICLReadCallback.getRef();

        // keep looping on processing information until we fully parse the message
        // and hand it off, or until the reads for more data go async
        VirtualConnection rc = null;
        do {
            if (handleNewInformation()) {
                // new information triggered an error message, so we're done
                return;
            }
            // Note: handleNewInformation will allocate the read buffers
            if (!isPartiallyParsed()) {
                // we're done parsing at this point. Note: cannot take any action
                // with information after this call because it may go all the way
                // from the channel above us back to the persist read, must exit
                // this callstack immediately
                handleNewRequest();
                return;
            }
            rc = this.myTSC.getReadInterface().read(1, callback, false, timeout);
        } while (null != rc);
    }
186495
public CallOptions withoutWaitForReady() {
    CallOptions newOptions = new CallOptions(this);
    newOptions.waitForReady = Boolean.FALSE;
    return newOptions;
  }
842614
public static void waitWhileState(final DeviceProxy proxy, final DevState waitState, final long timeout,
	    final long pollingTime) throws DevFailed, TimeoutException {
	final long time0 = System.currentTimeMillis();

	while (proxy.state().equals(waitState)) {
	    if (System.currentTimeMillis() - time0 > timeout) {
		throw new TimeoutException(
			"Stateutilities.waitWhileState : timeout reached while waiting end of state "
				+ TangoConst.Tango_DevStateName[waitState.value()]);
	    }
	    try {
		Thread.sleep(pollingTime);
	    } catch (final InterruptedException e) {
		// ignore
	    }
	}

    }
560878
def wait(self, timeout):
        """"""
        self.condition.acquire()
        self.condition.wait(timeout // 1000)
        self.condition.release()
1062439
private HttpPut preparePut(final String url) {
    final HttpPut httpPut = new HttpPut(this.instanceUrl + url);
    for (final Header header : this.headers) {
      httpPut.addHeader(header);
    }
    return httpPut;
  }
698486
private Object waitForResult(long timeoutMillis)
                    throws ExecutionException, InterruptedException, TimeoutException, RemoteException { // F16043
        final boolean isTraceOn = svLogger.isLoggable(Level.FINER);
        if (isTraceOn)
            svLogger.entering(CLASS_NAME, "waitForResult", Long.valueOf(timeoutMillis));

        long begin = System.nanoTime();
        // The nanoTime updated before every call to
        // RemoteAsyncResultExtended.waitForResult.
        long beginLastAttempt = begin;
        // The nanoTime when we should stop waiting altogether.  This value is
        // only used if timeout is non-zero.
        long end = begin + TimeUnit.MILLISECONDS.toNanos(timeoutMillis);

        // True if the client ORB has ever thrown a NO_RESPONSE.
        boolean noResponse = false;
        // The waitTime argument for the next call to
        // RemoteAsyncResultExtended.waitForResult.
        long waitTimeMillis = timeoutMillis;
        // The maximum value for waitTimeMillis.  This value is lazily
        // initialized when a NO_RESPONSE occurs.
        long maxWaitTimeMillis = -1;

        for (;;) {
            if (isTraceOn)
                svLogger.entering(CLASS_NAME, "waitForResult", "waiting " + waitTimeMillis);

            Object[] resultArray;
            try {
                resultArray = stubWaitForResult((Stub) ivServer, waitTimeMillis);
            } catch (RemoteException ex) {
                Throwable cause = ex.getCause();

                // If this is the first NO_RESPONSE, then try again with a shorter
                // server-side wait time.  For subsequent NO_RESPONSE, assume there
                // is a connection issue and rethrow the exception.
                if (cause instanceof NO_RESPONSE && !noResponse) {
                    if (isTraceOn)
                        svLogger.logp(Level.FINER, CLASS_NAME, "waitForResult", "retrying", cause);
                    resultArray = null;
                    noResponse = true;
                } else {
                    if (isTraceOn)
                        svLogger.exiting(CLASS_NAME, "waitForResult", ex);
                    throw ex;
                }
            }

            if (resultArray != null) {
                if (isTraceOn)
                    svLogger.exiting(CLASS_NAME, "waitForResult", "result");
                return resultArray[0];
            }

            // Either the client ORB or the server timed us out.  Choose a lower
            // waitTimeMillis and then try again.

            long now = System.nanoTime();

            if (timeoutMillis > 0) {
                long remainingMillis = TimeUnit.NANOSECONDS.toMillis(end - now);
                if (remainingMillis <= 0) {
                    if (isTraceOn)
                        svLogger.exiting(CLASS_NAME, "waitForResult", "timeout");
                    throw new TimeoutException();
                }

                waitTimeMillis = remainingMillis;
            }

            if (noResponse) {
                if (maxWaitTimeMillis == -1) {
                    // For the first NO_RESPONSE, set maximum server wait time for
                    // all subsequent requests based on how long the ORB actually
                    // waited before timing out this request.  Back off a little bit
                    // to give time for the server to respond.
                    long actualWaitTimeMillis = TimeUnit.NANOSECONDS.toMillis(now - beginLastAttempt);
                    maxWaitTimeMillis = Math.max(MIN_ASYNC_RESULT_NO_RESPONSE_WAIT_TIME,
                                                 actualWaitTimeMillis - AsyncResultNoResponseBackoff);
                }

                if (timeoutMillis == 0) {
                    waitTimeMillis = maxWaitTimeMillis;
                } else {
                    waitTimeMillis = Math.min(waitTimeMillis, maxWaitTimeMillis);
                }
            }

            beginLastAttempt = now;
        }
    }
999248
public T waitForResult ()
        throws ServiceException
    {
        try {
            if (waitForResponse()) {
                return getArgument();
            } else {
                throw getError();
            }

        } catch (InvocationException ie) {
            // pass these through without a fuss
            throw new ServiceException(ie.getMessage());

        } catch (Exception e) {
            log.warning(_ident + " failed.", e);
            throw new ServiceException(InvocationCodes.E_INTERNAL_ERROR);
        }
    }
542898
public boolean waitForResponse ()
        throws TimeoutException
    {
        if (_success == 0) {
            synchronized (this) {
                try {
                    // wait for the response, timing out after a while
                    if (_timeout == NO_TIMEOUT) {
                        wait();

                    } else {
                        wait(1000L * _timeout);
                    }
                    // if we get here without some sort of response, then we've timed out
                    if (_success == 0) {
                        throw new TimeoutException();
                    }

                } catch (InterruptedException ie) {
                    throw (TimeoutException)
                        new TimeoutException().initCause(ie);
                }
            }
        }

        return (_success > 0);
    }
212421
def wait(self):
        '''
        
        '''
        @param_to_property(action=["exists", "gone"])
        def _wait(action, timeout=3000):
            if timeout / 1000 + 5 > int(os.environ.get("JSONRPC_TIMEOUT", 90)):
                http_timeout = timeout / 1000 + 5
            else:
                http_timeout = int(os.environ.get("JSONRPC_TIMEOUT", 90))
            method = self.device.server.jsonrpc_wrap(
                timeout=http_timeout
            ).waitUntilGone if action == "gone" else self.device.server.jsonrpc_wrap(timeout=http_timeout).waitForExists
            return method(self.selector, timeout)
        return _wait
639571
def _wait_for_exec_ready(self):
        
        while not self.response_received.wait(1) and self.query_timeout != 0:
            if self.query_timeout != 0 and self.query_timeout < self.get_time():
                if self.prev:
                    cmd = self.prev.cmd
                else:
                    cmd = "???"
                self.logger.error("CMD timeout: "+ cmd)
                self.query_timeout = 0
                raise TestStepTimeout(self.name + " CMD timeout: " + cmd)
            self.logger.debug("Waiting for response... "
                              "timeout=%d", self.query_timeout - self.get_time())
            self._dut_is_alive()

        if self.response_coming_in == -1:
            if self.query_async_response is not None:
                # fullfill the async response with a dummy response and clean the state
                self.query_async_response.set_response(CliResponse())
                self.query_async_response = None
            # raise and log the error
            self.logger.error("No response received, DUT died")
            raise TestStepError("No response received, DUT "+self.name+" died")

        # if an async response is pending, fullfill it with the result
        if self.query_async_response is not None:
            self.query_async_response.set_response(self.response_coming_in)
            self.query_async_response = None

        self.query_timeout = 0
        return self.response_coming_in