From 6be8ce9e2614f62e9d3342e6e561c8fc43e4d702 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 13 Sep 2012 10:10:55 +0200 Subject: [PATCH] jetty-9 - HTTP client: renamed class. --- .../{EmptyHandler.java => EmptyServerHandler.java} | 2 +- .../jetty/client/HttpClientAuthenticationTest.java | 4 ++-- .../eclipse/jetty/client/HttpClientStreamTest.java | 2 +- .../org/eclipse/jetty/client/HttpClientTest.java | 14 +++++++------- .../jetty/client/HttpConnectionLifecycleTest.java | 8 ++++---- .../eclipse/jetty/client/HttpDestinationTest.java | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename jetty-client/src/test/java/org/eclipse/jetty/client/{EmptyHandler.java => EmptyServerHandler.java} (95%) diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/EmptyHandler.java b/jetty-client/src/test/java/org/eclipse/jetty/client/EmptyServerHandler.java similarity index 95% rename from jetty-client/src/test/java/org/eclipse/jetty/client/EmptyHandler.java rename to jetty-client/src/test/java/org/eclipse/jetty/client/EmptyServerHandler.java index bfedac1c5a7..d5af3dd9534 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/EmptyHandler.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/EmptyServerHandler.java @@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; -public class EmptyHandler extends AbstractHandler +public class EmptyServerHandler extends AbstractHandler { @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java index 5476630ec1d..fb5cfd8514f 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java @@ -85,14 +85,14 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest @Test public void test_BasicAuthentication() throws Exception { - startBasic(new EmptyHandler()); + startBasic(new EmptyServerHandler()); test_Authentication(new BasicAuthentication("http://localhost:" + connector.getLocalPort(), realm, "basic", "basic")); } @Test public void test_DigestAuthentication() throws Exception { - startDigest(new EmptyHandler()); + startDigest(new EmptyServerHandler()); test_Authentication(new DigestAuthentication("http://localhost:" + connector.getLocalPort(), realm, "digest", "digest")); } diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientStreamTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientStreamTest.java index 321471c3cda..6bc17b34895 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientStreamTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientStreamTest.java @@ -49,7 +49,7 @@ public class HttpClientStreamTest extends AbstractHttpClientServerTest output.write(kb); } - start(new EmptyHandler()); + start(new EmptyServerHandler()); final AtomicLong requestTime = new AtomicLong(); ContentResponse response = client.newRequest("localhost", connector.getLocalPort()) 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 9a7b21ed2cd..ac58761f4fb 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 @@ -57,7 +57,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void testStoppingClosesConnections() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); String scheme = "http"; String host = "localhost"; @@ -91,7 +91,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void test_DestinationCount() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); String scheme = "http"; String host = "localhost"; @@ -111,7 +111,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void test_GET_ResponseWithoutContent() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); Response response = client.GET("http://localhost:" + connector.getLocalPort()).get(5, TimeUnit.SECONDS); @@ -212,7 +212,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void test_QueuedRequest_IsSent_WhenPreviousRequestSucceeded() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); client.setMaxConnectionsPerAddress(1); @@ -270,7 +270,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void test_QueuedRequest_IsSent_WhenPreviousRequestClosedConnection() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); client.setMaxConnectionsPerAddress(1); final long idleTimeout = 1000; @@ -326,7 +326,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void test_ExchangeIsComplete_OnlyWhenBothRequestAndResponseAreComplete() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); // Prepare a big file to upload Path targetTestsDir = MavenTestingUtils.getTargetTestingDir().toPath(); @@ -429,7 +429,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Test public void test_ExchangeIsComplete_WhenRequestFails_WithNoResponse() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); final CountDownLatch latch = new CountDownLatch(1); final String host = "localhost"; diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpConnectionLifecycleTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpConnectionLifecycleTest.java index 58fadcb02cd..32a74d9cf17 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpConnectionLifecycleTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpConnectionLifecycleTest.java @@ -42,7 +42,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest @Test public void test_SuccessfulRequest_ReturnsConnection() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); String scheme = "http"; String host = "localhost"; @@ -100,7 +100,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest @Test public void test_FailedRequest_RemovesConnection() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); String scheme = "http"; String host = "localhost"; @@ -151,7 +151,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest @Test public void test_BadRequest_RemovesConnection() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); String scheme = "http"; String host = "localhost"; @@ -209,7 +209,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest @Test public void test_ConnectionFailure_RemovesConnection() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); String scheme = "http"; String host = "localhost"; diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpDestinationTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpDestinationTest.java index 2d57e34949c..9cebbf403bc 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpDestinationTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpDestinationTest.java @@ -32,7 +32,7 @@ public class HttpDestinationTest extends AbstractHttpClientServerTest @Before public void init() throws Exception { - start(new EmptyHandler()); + start(new EmptyServerHandler()); } @Test