jetty-9 - HTTP client: renamed class.

This commit is contained in:
Simone Bordet 2012-09-13 10:10:55 +02:00
parent 312785eb7b
commit 6be8ce9e26
6 changed files with 16 additions and 16 deletions

View File

@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.handler.AbstractHandler;
public class EmptyHandler extends AbstractHandler public class EmptyServerHandler extends AbstractHandler
{ {
@Override @Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException

View File

@ -85,14 +85,14 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
@Test @Test
public void test_BasicAuthentication() throws Exception public void test_BasicAuthentication() throws Exception
{ {
startBasic(new EmptyHandler()); startBasic(new EmptyServerHandler());
test_Authentication(new BasicAuthentication("http://localhost:" + connector.getLocalPort(), realm, "basic", "basic")); test_Authentication(new BasicAuthentication("http://localhost:" + connector.getLocalPort(), realm, "basic", "basic"));
} }
@Test @Test
public void test_DigestAuthentication() throws Exception public void test_DigestAuthentication() throws Exception
{ {
startDigest(new EmptyHandler()); startDigest(new EmptyServerHandler());
test_Authentication(new DigestAuthentication("http://localhost:" + connector.getLocalPort(), realm, "digest", "digest")); test_Authentication(new DigestAuthentication("http://localhost:" + connector.getLocalPort(), realm, "digest", "digest"));
} }

View File

@ -49,7 +49,7 @@ public class HttpClientStreamTest extends AbstractHttpClientServerTest
output.write(kb); output.write(kb);
} }
start(new EmptyHandler()); start(new EmptyServerHandler());
final AtomicLong requestTime = new AtomicLong(); final AtomicLong requestTime = new AtomicLong();
ContentResponse response = client.newRequest("localhost", connector.getLocalPort()) ContentResponse response = client.newRequest("localhost", connector.getLocalPort())

View File

@ -57,7 +57,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void testStoppingClosesConnections() throws Exception public void testStoppingClosesConnections() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
String scheme = "http"; String scheme = "http";
String host = "localhost"; String host = "localhost";
@ -91,7 +91,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void test_DestinationCount() throws Exception public void test_DestinationCount() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
String scheme = "http"; String scheme = "http";
String host = "localhost"; String host = "localhost";
@ -111,7 +111,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void test_GET_ResponseWithoutContent() throws Exception 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); Response response = client.GET("http://localhost:" + connector.getLocalPort()).get(5, TimeUnit.SECONDS);
@ -212,7 +212,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void test_QueuedRequest_IsSent_WhenPreviousRequestSucceeded() throws Exception public void test_QueuedRequest_IsSent_WhenPreviousRequestSucceeded() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
client.setMaxConnectionsPerAddress(1); client.setMaxConnectionsPerAddress(1);
@ -270,7 +270,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void test_QueuedRequest_IsSent_WhenPreviousRequestClosedConnection() throws Exception public void test_QueuedRequest_IsSent_WhenPreviousRequestClosedConnection() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
client.setMaxConnectionsPerAddress(1); client.setMaxConnectionsPerAddress(1);
final long idleTimeout = 1000; final long idleTimeout = 1000;
@ -326,7 +326,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void test_ExchangeIsComplete_OnlyWhenBothRequestAndResponseAreComplete() throws Exception public void test_ExchangeIsComplete_OnlyWhenBothRequestAndResponseAreComplete() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
// Prepare a big file to upload // Prepare a big file to upload
Path targetTestsDir = MavenTestingUtils.getTargetTestingDir().toPath(); Path targetTestsDir = MavenTestingUtils.getTargetTestingDir().toPath();
@ -429,7 +429,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Test @Test
public void test_ExchangeIsComplete_WhenRequestFails_WithNoResponse() throws Exception public void test_ExchangeIsComplete_WhenRequestFails_WithNoResponse() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
final CountDownLatch latch = new CountDownLatch(1); final CountDownLatch latch = new CountDownLatch(1);
final String host = "localhost"; final String host = "localhost";

View File

@ -42,7 +42,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
@Test @Test
public void test_SuccessfulRequest_ReturnsConnection() throws Exception public void test_SuccessfulRequest_ReturnsConnection() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
String scheme = "http"; String scheme = "http";
String host = "localhost"; String host = "localhost";
@ -100,7 +100,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
@Test @Test
public void test_FailedRequest_RemovesConnection() throws Exception public void test_FailedRequest_RemovesConnection() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
String scheme = "http"; String scheme = "http";
String host = "localhost"; String host = "localhost";
@ -151,7 +151,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
@Test @Test
public void test_BadRequest_RemovesConnection() throws Exception public void test_BadRequest_RemovesConnection() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
String scheme = "http"; String scheme = "http";
String host = "localhost"; String host = "localhost";
@ -209,7 +209,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
@Test @Test
public void test_ConnectionFailure_RemovesConnection() throws Exception public void test_ConnectionFailure_RemovesConnection() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
String scheme = "http"; String scheme = "http";
String host = "localhost"; String host = "localhost";

View File

@ -32,7 +32,7 @@ public class HttpDestinationTest extends AbstractHttpClientServerTest
@Before @Before
public void init() throws Exception public void init() throws Exception
{ {
start(new EmptyHandler()); start(new EmptyServerHandler());
} }
@Test @Test