Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2015-11-04 09:06:10 -0500
committerSimone Bordet2015-11-04 09:06:10 -0500
commitf717ff5f4944d08ad3f73c7410621c3ffdebc809 (patch)
tree8c196419e5a30e44fed1471fb812fdf05b99861a
parent82d0807863990a3e26636ba09945e930adf6d5dd (diff)
parentafc6b9e5c0644287cd0c5a510491e6477e0f6218 (diff)
downloadorg.eclipse.jetty.project-f717ff5f4944d08ad3f73c7410621c3ffdebc809.tar.gz
org.eclipse.jetty.project-f717ff5f4944d08ad3f73c7410621c3ffdebc809.tar.xz
org.eclipse.jetty.project-f717ff5f4944d08ad3f73c7410621c3ffdebc809.zip
Merged branch 'jetty-9.3.x' into 'master'.
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
index 10cac8fba3..404a3e8e3f 100644
--- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
+++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
@@ -47,6 +47,7 @@ import java.util.concurrent.Exchanger;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
@@ -63,6 +64,7 @@ import org.eclipse.jetty.client.api.Destination;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.api.Result;
+import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP;
import org.eclipse.jetty.client.http.HttpConnectionOverHTTP;
import org.eclipse.jetty.client.http.HttpDestinationOverHTTP;
import org.eclipse.jetty.client.util.BufferingResponseListener;
@@ -75,6 +77,7 @@ import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpHeaderValue;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.toolchain.test.TestingDir;
import org.eclipse.jetty.toolchain.test.annotation.Slow;
@@ -1467,23 +1470,15 @@ public class HttpClientTest extends AbstractHttpClientServerTest
final CountDownLatch latch = new CountDownLatch(2);
client.newRequest("localhost", connector.getLocalPort())
.scheme(scheme)
- .onRequestBegin(new Request.BeginListener()
+ .onRequestBegin(request ->
{
- @Override
- public void onBegin(Request request)
- {
- Assert.assertTrue(open.get());
- latch.countDown();
- }
+ Assert.assertTrue(open.get());
+ latch.countDown();
})
- .send(new Response.CompleteListener()
+ .send(result ->
{
- @Override
- public void onComplete(Result result)
- {
- if (result.isSucceeded())
- latch.countDown();
- }
+ if (result.isSucceeded())
+ latch.countDown();
});
Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));

Back to the top