Search in sources :

Example 1 with HttpProxy

use of io.vertx.test.core.HttpProxy in project vert.x by eclipse.

the class ProxyErrorTest method startProxy.

// we don't start http/https servers, due to the error, they will not be queried
private void startProxy(int error, String username) throws InterruptedException {
    CountDownLatch latch = new CountDownLatch(1);
    proxy = new HttpProxy(username);
    proxy.setError(error);
    proxy.start(vertx, v -> latch.countDown());
    latch.await();
}
Also used : HttpProxy(io.vertx.test.core.HttpProxy) CountDownLatch(java.util.concurrent.CountDownLatch)

Aggregations

HttpProxy (io.vertx.test.core.HttpProxy)1 CountDownLatch (java.util.concurrent.CountDownLatch)1