hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r954402 - in /httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http: ./ impl/nio/reactor/ mockup/ nio/protocol/
Date Mon, 14 Jun 2010 10:16:39 GMT
Author: sebb
Date: Mon Jun 14 10:16:39 2010
New Revision: 954402

URL: http://svn.apache.org/viewvc?rev=954402&view=rev
Log:
Rename Test*.java files that don't contain tests

Added:
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpClientNio.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpClientNio.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLClient.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLServer.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpServerNio.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpServerNio.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/Job.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestJob.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestExecutionHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java
      - copied, changed from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestHandler.java
Removed:
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpClientNio.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpServerNio.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestJob.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestExecutionHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestHandler.java
Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBufferingNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestNIOSSLHttp.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestTruncatedChunks.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java Mon Jun 14 10:16:39 2010
@@ -31,8 +31,8 @@ import java.io.IOException;
 
 import junit.framework.TestCase;
 
-import org.apache.http.mockup.TestHttpSSLClient;
-import org.apache.http.mockup.TestHttpSSLServer;
+import org.apache.http.mockup.HttpSSLClient;
+import org.apache.http.mockup.HttpSSLServer;
 import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.params.HttpParams;
@@ -47,8 +47,8 @@ public class HttpCoreNIOSSLTestBase exte
         super(testName);
     }
 
-    protected TestHttpSSLServer server;
-    protected TestHttpSSLClient client;
+    protected HttpSSLServer server;
+    protected HttpSSLClient client;
 
     @Override
     protected void setUp() throws Exception {
@@ -60,7 +60,7 @@ public class HttpCoreNIOSSLTestBase exte
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
 
-        this.server = new TestHttpSSLServer(serverParams);
+        this.server = new HttpSSLServer(serverParams);
         this.server.setExceptionHandler(new SimpleIOReactorExceptionHandler());
 
         HttpParams clientParams = new SyncBasicHttpParams();
@@ -72,7 +72,7 @@ public class HttpCoreNIOSSLTestBase exte
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
 
-        this.client = new TestHttpSSLClient(clientParams);
+        this.client = new HttpSSLClient(clientParams);
         this.client.setExceptionHandler(new SimpleIOReactorExceptionHandler());
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java Mon Jun 14 10:16:39 2010
@@ -31,8 +31,8 @@ import java.io.IOException;
 
 import junit.framework.TestCase;
 
-import org.apache.http.mockup.TestHttpClientNio;
-import org.apache.http.mockup.TestHttpServerNio;
+import org.apache.http.mockup.HttpClientNio;
+import org.apache.http.mockup.HttpServerNio;
 import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.params.HttpParams;
@@ -48,8 +48,8 @@ public class HttpCoreNIOTestBase extends
         super(testName);
     }
 
-    protected TestHttpServerNio server;
-    protected TestHttpClientNio client;
+    protected HttpServerNio server;
+    protected HttpClientNio client;
 
     @Override
     protected void setUp() throws Exception {
@@ -61,7 +61,7 @@ public class HttpCoreNIOTestBase extends
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
 
-        this.server = new TestHttpServerNio(serverParams);
+        this.server = new HttpServerNio(serverParams);
         this.server.setExceptionHandler(new SimpleIOReactorExceptionHandler());
 
         HttpParams clientParams = new SyncBasicHttpParams();
@@ -73,7 +73,7 @@ public class HttpCoreNIOTestBase extends
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
 
-        this.client = new TestHttpClientNio(clientParams);
+        this.client = new HttpClientNio(clientParams);
         this.client.setExceptionHandler(new SimpleIOReactorExceptionHandler());
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java Mon Jun 14 10:16:39 2010
@@ -48,7 +48,7 @@ import org.apache.http.HttpResponseInter
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.mockup.SimpleHttpRequestHandlerResolver;
-import org.apache.http.mockup.TestHttpSSLServer;
+import org.apache.http.mockup.HttpSSLServer;
 import org.apache.http.nio.NHttpServiceHandler;
 import org.apache.http.nio.protocol.BufferingHttpServiceHandler;
 import org.apache.http.nio.protocol.EventListener;
@@ -69,7 +69,7 @@ import org.apache.http.protocol.Response
 
 public class TestBaseIOReactorSSL extends TestCase {
 
-    private TestHttpSSLServer server;
+    private HttpSSLServer server;
 
     @Override
     protected void setUp() throws Exception {
@@ -81,7 +81,7 @@ public class TestBaseIOReactorSSL extend
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
 
-        this.server = new TestHttpSSLServer(serverParams);
+        this.server = new HttpSSLServer(serverParams);
     }
 
     @Override

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpClientNio.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpClientNio.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpClientNio.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpClientNio.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpClientNio.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpClientNio.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpClientNio.java Mon Jun 14 10:16:39 2010
@@ -41,14 +41,14 @@ import org.apache.http.nio.reactor.IORea
 import org.apache.http.nio.reactor.SessionRequest;
 import org.apache.http.params.HttpParams;
 
-public class TestHttpClientNio {
+public class HttpClientNio {
 
     private final DefaultConnectingIOReactor ioReactor;
     private final HttpParams params;
 
     private volatile IOReactorThread thread;
 
-    public TestHttpClientNio(final HttpParams params) throws IOException {
+    public HttpClientNio(final HttpParams params) throws IOException {
         super();
         this.ioReactor = new DefaultConnectingIOReactor(2, params);
         this.params = params;

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLClient.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLClient.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLClient.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLClient.java Mon Jun 14 10:16:39 2010
@@ -48,7 +48,7 @@ import org.apache.http.nio.reactor.IORea
 import org.apache.http.nio.reactor.SessionRequest;
 import org.apache.http.params.HttpParams;
 
-public class TestHttpSSLClient {
+public class HttpSSLClient {
 
     private final SSLContext sslcontext;
     private final DefaultConnectingIOReactor ioReactor;
@@ -56,7 +56,7 @@ public class TestHttpSSLClient {
 
     private volatile IOReactorThread thread;
 
-    public TestHttpSSLClient(final HttpParams params) throws Exception {
+    public HttpSSLClient(final HttpParams params) throws Exception {
         super();
         this.params = params;
         this.sslcontext = createSSLContext();

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLServer.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLServer.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLServer.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpSSLServer.java Mon Jun 14 10:16:39 2010
@@ -52,7 +52,7 @@ import org.apache.http.params.HttpParams
  * Trivial test server based on HttpCore NIO SSL
  *
  */
-public class TestHttpSSLServer {
+public class HttpSSLServer {
 
     private final SSLContext sslcontext;
     private final DefaultListeningIOReactor ioReactor;
@@ -61,7 +61,7 @@ public class TestHttpSSLServer {
     private volatile IOReactorThread thread;
     private ListenerEndpoint endpoint;
 
-    public TestHttpSSLServer(final HttpParams params) throws Exception {
+    public HttpSSLServer(final HttpParams params) throws Exception {
         super();
         this.params = params;
         this.sslcontext = createSSLContext();

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpServerNio.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpServerNio.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpServerNio.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpServerNio.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpServerNio.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpServerNio.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/HttpServerNio.java Mon Jun 14 10:16:39 2010
@@ -45,7 +45,7 @@ import org.apache.http.params.HttpParams
  * Trivial test server based on HttpCore NIO
  *
  */
-public class TestHttpServerNio {
+public class HttpServerNio {
 
     private final DefaultListeningIOReactor ioReactor;
     private final HttpParams params;
@@ -53,7 +53,7 @@ public class TestHttpServerNio {
     private volatile IOReactorThread thread;
     private ListenerEndpoint endpoint;
 
-    public TestHttpServerNio(final HttpParams params) throws IOException {
+    public HttpServerNio(final HttpParams params) throws IOException {
         super();
         this.ioReactor = new DefaultListeningIOReactor(2, params);
         this.params = params;

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/Job.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestJob.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/Job.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/Job.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestJob.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestJob.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/Job.java Mon Jun 14 10:16:39 2010
@@ -29,7 +29,7 @@ package org.apache.http.nio.protocol;
 
 import java.util.Random;
 
-public class TestJob {
+public class Job {
 
     private static final Random RND = new Random();
     private static final String TEST_CHARS = "0123456789ABCDEF";
@@ -43,7 +43,7 @@ public class TestJob {
     private volatile String failureMessage;
     private volatile Exception ex;
 
-    public TestJob(int maxCount) {
+    public Job(int maxCount) {
         super();
         this.count = RND.nextInt(maxCount - 1) + 1;
         StringBuilder buffer = new StringBuilder();
@@ -54,11 +54,11 @@ public class TestJob {
         this.pattern = buffer.toString();
     }
 
-    public TestJob() {
+    public Job() {
         this(1000);
     }
 
-    public TestJob(final String pattern, int count) {
+    public Job(final String pattern, int count) {
         super();
         this.count = count;
         this.pattern = pattern;

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestExecutionHandler.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestExecutionHandler.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestExecutionHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java Mon Jun 14 10:16:39 2010
@@ -39,24 +39,24 @@ import org.apache.http.nio.util.HeapByte
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.util.EntityUtils;
 
-abstract class TestRequestExecutionHandler
+abstract class RequestExecutionHandler
     implements NHttpRequestExecutionHandler, HttpRequestExecutionHandler {
 
     public void initalizeContext(final HttpContext context, final Object attachment) {
         context.setAttribute("queue", attachment);
     }
 
-    protected abstract HttpRequest generateRequest(TestJob testjob);
+    protected abstract HttpRequest generateRequest(Job testjob);
 
     public HttpRequest submitRequest(final HttpContext context) {
 
         @SuppressWarnings("unchecked")
-        Queue<TestJob> queue = (Queue<TestJob>) context.getAttribute("queue");
+        Queue<Job> queue = (Queue<Job>) context.getAttribute("queue");
         if (queue == null) {
             throw new IllegalStateException("Queue is null");
         }
 
-        TestJob testjob = queue.poll();
+        Job testjob = queue.poll();
         context.setAttribute("job", testjob);
 
         if (testjob != null) {
@@ -74,7 +74,7 @@ abstract class TestRequestExecutionHandl
     }
 
     public void handleResponse(final HttpResponse response, final HttpContext context) {
-        TestJob testjob = (TestJob) context.removeAttribute("job");
+        Job testjob = (Job) context.removeAttribute("job");
         if (testjob == null) {
             throw new IllegalStateException("TestJob is null");
         }
@@ -94,7 +94,7 @@ abstract class TestRequestExecutionHandl
     }
 
     public void finalizeContext(final HttpContext context) {
-        TestJob testjob = (TestJob) context.removeAttribute("job");
+        Job testjob = (Job) context.removeAttribute("job");
         if (testjob != null) {
             testjob.fail("Request failed");
         }

Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java (from r954153, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestHandler.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestHandler.java&r1=954153&r2=954402&rev=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestRequestHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java Mon Jun 14 10:16:39 2010
@@ -43,15 +43,15 @@ import org.apache.http.protocol.HttpCont
 import org.apache.http.protocol.HttpRequestHandler;
 import org.apache.http.util.EntityUtils;
 
-final class TestRequestHandler extends SimpleNHttpRequestHandler implements HttpRequestHandler {
+final class RequestHandler extends SimpleNHttpRequestHandler implements HttpRequestHandler {
 
     private final boolean chunking;
 
-    TestRequestHandler() {
+    RequestHandler() {
         this(false);
     }
 
-    TestRequestHandler(boolean chunking) {
+    RequestHandler(boolean chunking) {
         super();
         this.chunking = chunking;
     }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestAsyncNHttpHandlers.java Mon Jun 14 10:16:39 2010
@@ -88,11 +88,11 @@ public class TestAsyncNHttpHandlers exte
             final NHttpRequestExecutionHandler requestExecutionHandler) throws Exception {
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -160,7 +160,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());
@@ -176,16 +176,16 @@ public class TestAsyncNHttpHandlers exte
      * over multiple connections. This uses non-blocking output entities.
      */
     public void testHttpGets() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -194,10 +194,10 @@ public class TestAsyncNHttpHandlers exte
      * It uses purely asynchronous handlers.
      */
     public void testHttpPostsWithContentLength() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -211,7 +211,7 @@ public class TestAsyncNHttpHandlers exte
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -220,10 +220,10 @@ public class TestAsyncNHttpHandlers exte
      * with nonblocking handlers & nonblocking entities.
      */
     public void testHttpPostsChunked() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -237,7 +237,7 @@ public class TestAsyncNHttpHandlers exte
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -246,10 +246,10 @@ public class TestAsyncNHttpHandlers exte
      * handlers & entities.
      */
     public void testHttpPostsHTTP10() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s,
                         HttpVersion.HTTP_1_0);
@@ -263,7 +263,7 @@ public class TestAsyncNHttpHandlers exte
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -272,10 +272,10 @@ public class TestAsyncNHttpHandlers exte
      * uses nonblocking handlers & entities.
      */
     public void testHttpPostsWithExpectContinue() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -289,7 +289,7 @@ public class TestAsyncNHttpHandlers exte
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -298,11 +298,11 @@ public class TestAsyncNHttpHandlers exte
      * This test uses nonblocking entities.
      */
     public void testHttpPostsWithExpectationVerification() throws Exception {
-        TestJob[] jobs = new TestJob[3];
-        jobs[0] = new TestJob("AAAAA", 10);
-        jobs[1] = new TestJob("AAAAA", 10);
-        jobs[2] = new TestJob("BBBBB", 20);
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Job[] jobs = new Job[3];
+        jobs[0] = new Job("AAAAA", 10);
+        jobs[1] = new Job("AAAAA", 10);
+        jobs[2] = new Job("BBBBB", 20);
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -324,10 +324,10 @@ public class TestAsyncNHttpHandlers exte
 
         };
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -356,7 +356,7 @@ public class TestAsyncNHttpHandlers exte
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleNHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setExpectationVerifier(
                 expectationVerifier);
         serviceHandler.setEventListener(
@@ -399,7 +399,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < 2; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(testjob.getExpected(), testjob.getResult());
@@ -407,7 +407,7 @@ public class TestAsyncNHttpHandlers exte
                 fail(testjob.getFailureMessage());
             }
         }
-        TestJob failedExpectation = jobs[2];
+        Job failedExpectation = jobs[2];
         failedExpectation.waitFor();
         assertEquals(HttpStatus.SC_EXPECTATION_FAILED, failedExpectation.getStatusCode());
     }
@@ -419,19 +419,19 @@ public class TestAsyncNHttpHandlers exte
     public void testHttpHeads() throws Exception {
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("HEAD", s);
             }
@@ -452,7 +452,7 @@ public class TestAsyncNHttpHandlers exte
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleNHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 
@@ -500,7 +500,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.getFailureMessage() != null) {
                 fail(testjob.getFailureMessage());
@@ -561,10 +561,10 @@ public class TestAsyncNHttpHandlers exte
 
         };
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
@@ -596,10 +596,10 @@ public class TestAsyncNHttpHandlers exte
 
         };
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
@@ -608,11 +608,11 @@ public class TestAsyncNHttpHandlers exte
 
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -679,7 +679,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, testjob.getStatusCode());
@@ -717,10 +717,10 @@ public class TestAsyncNHttpHandlers exte
 
         };
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
@@ -729,11 +729,11 @@ public class TestAsyncNHttpHandlers exte
 
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -800,7 +800,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, testjob.getStatusCode());
@@ -815,10 +815,10 @@ public class TestAsyncNHttpHandlers exte
      * This test makes sure that if no service handler is installed, things still work.
      */
     public void testNoServiceHandler() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
@@ -826,11 +826,11 @@ public class TestAsyncNHttpHandlers exte
         };
 
         int connNo = 5;
-        TestJob[] jobs = new TestJob[connNo];
+        Job[] jobs = new Job[connNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -895,7 +895,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
 
             testjob.waitFor();
             if (testjob.isSuccessful()) {
@@ -913,10 +913,10 @@ public class TestAsyncNHttpHandlers exte
      * and the server can read them.
      */
     public void testHttpPostWithNoEntities() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 r.setEntity(null);
@@ -927,11 +927,11 @@ public class TestAsyncNHttpHandlers exte
 
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -950,7 +950,7 @@ public class TestAsyncNHttpHandlers exte
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleNHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 
@@ -998,7 +998,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());
@@ -1014,10 +1014,10 @@ public class TestAsyncNHttpHandlers exte
      * with zero-length entities on the client side.
      */
     public void testHttpPostWithZeroLengthEntities() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NByteArrayEntity entity = new NByteArrayEntity(new byte[] {} );
@@ -1030,11 +1030,11 @@ public class TestAsyncNHttpHandlers exte
 
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -1053,7 +1053,7 @@ public class TestAsyncNHttpHandlers exte
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleNHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 
@@ -1101,7 +1101,7 @@ public class TestAsyncNHttpHandlers exte
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBufferingNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBufferingNHttpHandlers.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBufferingNHttpHandlers.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBufferingNHttpHandlers.java Mon Jun 14 10:16:39 2010
@@ -82,11 +82,11 @@ public class TestBufferingNHttpHandlers 
             final HttpRequestExecutionHandler requestExecutionHandler) throws Exception {
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -154,7 +154,7 @@ public class TestBufferingNHttpHandlers 
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());
@@ -170,16 +170,16 @@ public class TestBufferingNHttpHandlers 
      * over multiple connections.
      */
     public void testHttpGets() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -187,10 +187,10 @@ public class TestBufferingNHttpHandlers 
      * with content length delimited content over multiple connections.
      */
     public void testHttpPostsWithContentLength() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -204,7 +204,7 @@ public class TestBufferingNHttpHandlers 
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -212,10 +212,10 @@ public class TestBufferingNHttpHandlers 
      * with chunk coded content content over multiple connections.
      */
     public void testHttpPostsChunked() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -229,7 +229,7 @@ public class TestBufferingNHttpHandlers 
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -237,10 +237,10 @@ public class TestBufferingNHttpHandlers 
      * POST requests over multiple persistent connections.
      */
     public void testHttpPostsHTTP10() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s,
                         HttpVersion.HTTP_1_0);
@@ -254,7 +254,7 @@ public class TestBufferingNHttpHandlers 
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -262,10 +262,10 @@ public class TestBufferingNHttpHandlers 
      * over multiple connections using the 'expect: continue' handshake.
      */
     public void testHttpPostsWithExpectContinue() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -279,7 +279,7 @@ public class TestBufferingNHttpHandlers 
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
 }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestNIOSSLHttp.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestNIOSSLHttp.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestNIOSSLHttp.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestNIOSSLHttp.java Mon Jun 14 10:16:39 2010
@@ -80,11 +80,11 @@ public class TestNIOSSLHttp extends Http
             final NHttpRequestExecutionHandler requestExecutionHandler) throws Exception {
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -152,7 +152,7 @@ public class TestNIOSSLHttp extends Http
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());
@@ -168,16 +168,16 @@ public class TestNIOSSLHttp extends Http
      * over multiple connections.
      */
     public void testHttpGets() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -185,10 +185,10 @@ public class TestNIOSSLHttp extends Http
      * with content length delimited content over multiple connections.
      */
     public void testHttpPostsWithContentLength() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -202,7 +202,7 @@ public class TestNIOSSLHttp extends Http
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -210,10 +210,10 @@ public class TestNIOSSLHttp extends Http
      * with chunk coded content content over multiple connections.
      */
     public void testHttpPostsChunked() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -227,7 +227,7 @@ public class TestNIOSSLHttp extends Http
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -235,10 +235,10 @@ public class TestNIOSSLHttp extends Http
      * POST requests over multiple persistent connections.
      */
     public void testHttpPostsHTTP10() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s,
                         HttpVersion.HTTP_1_0);
@@ -252,7 +252,7 @@ public class TestNIOSSLHttp extends Http
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -261,10 +261,10 @@ public class TestNIOSSLHttp extends Http
      * uses nonblocking handlers & entities.
      */
     public void testHttpPostsWithExpectContinue() throws Exception {
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -278,7 +278,7 @@ public class TestNIOSSLHttp extends Http
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
 }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java Mon Jun 14 10:16:39 2010
@@ -119,11 +119,11 @@ public class TestThrottlingNHttpHandlers
             final HttpRequestExecutionHandler requestExecutionHandler) throws Exception {
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -193,7 +193,7 @@ public class TestThrottlingNHttpHandlers
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());
@@ -209,16 +209,16 @@ public class TestThrottlingNHttpHandlers
      * over multiple connections.
      */
     public void testSimpleHttpGets() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -226,10 +226,10 @@ public class TestThrottlingNHttpHandlers
      * with content length delimited content over multiple connections.
      */
     public void testSimpleHttpPostsWithContentLength() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -243,7 +243,7 @@ public class TestThrottlingNHttpHandlers
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -251,10 +251,10 @@ public class TestThrottlingNHttpHandlers
      * with chunk coded content content over multiple connections.
      */
     public void testSimpleHttpPostsChunked() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -268,7 +268,7 @@ public class TestThrottlingNHttpHandlers
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -440,10 +440,10 @@ public class TestThrottlingNHttpHandlers
      * POST requests over multiple persistent connections.
      */
     public void testSimpleHttpPostsHTTP10() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s,
                         HttpVersion.HTTP_1_0);
@@ -457,7 +457,7 @@ public class TestThrottlingNHttpHandlers
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -465,10 +465,10 @@ public class TestThrottlingNHttpHandlers
      * over multiple connections using the 'expect: continue' handshake.
      */
     public void testHttpPostsWithExpectContinue() throws Exception {
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -482,7 +482,7 @@ public class TestThrottlingNHttpHandlers
             }
 
         };
-        executeStandardTest(new TestRequestHandler(), requestExecutionHandler);
+        executeStandardTest(new RequestHandler(), requestExecutionHandler);
     }
 
     /**
@@ -490,11 +490,11 @@ public class TestThrottlingNHttpHandlers
      * over multiple connections that do not meet the target server expectations.
      */
     public void testHttpPostsWithExpectationVerification() throws Exception {
-        TestJob[] jobs = new TestJob[3];
-        jobs[0] = new TestJob("AAAAA", 10);
-        jobs[1] = new TestJob("AAAAA", 10);
-        jobs[2] = new TestJob("BBBBB", 20);
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Job[] jobs = new Job[3];
+        jobs[0] = new Job("AAAAA", 10);
+        jobs[1] = new Job("AAAAA", 10);
+        jobs[2] = new Job("BBBBB", 20);
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -516,10 +516,10 @@ public class TestThrottlingNHttpHandlers
 
         };
 
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -549,7 +549,7 @@ public class TestThrottlingNHttpHandlers
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setExpectationVerifier(
                 expectationVerifier);
         serviceHandler.setEventListener(
@@ -594,7 +594,7 @@ public class TestThrottlingNHttpHandlers
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < 2; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(testjob.getExpected(), testjob.getResult());
@@ -602,7 +602,7 @@ public class TestThrottlingNHttpHandlers
                 fail(testjob.getFailureMessage());
             }
         }
-        TestJob failedExpectation = jobs[2];
+        Job failedExpectation = jobs[2];
         failedExpectation.waitFor();
         assertEquals(HttpStatus.SC_EXPECTATION_FAILED, failedExpectation.getStatusCode());
     }
@@ -614,19 +614,19 @@ public class TestThrottlingNHttpHandlers
     public void testSimpleHttpHeads() throws Exception {
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
 
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("HEAD", s);
             }
@@ -648,7 +648,7 @@ public class TestThrottlingNHttpHandlers
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 
@@ -697,7 +697,7 @@ public class TestThrottlingNHttpHandlers
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.getFailureMessage() != null) {
                 fail(testjob.getFailureMessage());
@@ -726,10 +726,10 @@ public class TestThrottlingNHttpHandlers
             }
 
         };
-        HttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
                 NStringEntity entity = null;
@@ -745,11 +745,11 @@ public class TestThrottlingNHttpHandlers
         };
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob();
+            jobs[i] = new Job();
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -819,7 +819,7 @@ public class TestThrottlingNHttpHandlers
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, testjob.getStatusCode());
@@ -840,12 +840,12 @@ public class TestThrottlingNHttpHandlers
             public HttpRequest submitRequest(final HttpContext context) {
 
                 @SuppressWarnings("unchecked")
-                Queue<TestJob> queue = (Queue<TestJob>) context.getAttribute("queue");
+                Queue<Job> queue = (Queue<Job>) context.getAttribute("queue");
                 if (queue == null) {
                     throw new IllegalStateException("Queue is null");
                 }
 
-                TestJob testjob = queue.poll();
+                Job testjob = queue.poll();
                 context.setAttribute("job", testjob);
 
                 if (testjob != null) {
@@ -865,7 +865,7 @@ public class TestThrottlingNHttpHandlers
             }
 
             public void handleResponse(final HttpResponse response, final HttpContext context) {
-                TestJob testjob = (TestJob) context.removeAttribute("job");
+                Job testjob = (Job) context.removeAttribute("job");
                 if (testjob == null) {
                     throw new IllegalStateException("TestJob is null");
                 }
@@ -899,7 +899,7 @@ public class TestThrottlingNHttpHandlers
             }
 
             public void finalizeContext(final HttpContext context) {
-                TestJob testjob = (TestJob) context.removeAttribute("job");
+                Job testjob = (Job) context.removeAttribute("job");
                 if (testjob != null) {
                     testjob.fail("Request failed");
                 }
@@ -908,11 +908,11 @@ public class TestThrottlingNHttpHandlers
         };
         int connNo = 3;
         int reqNo = 20;
-        TestJob[] jobs = new TestJob[connNo * reqNo];
+        Job[] jobs = new Job[connNo * reqNo];
         for (int i = 0; i < jobs.length; i++) {
-            jobs[i] = new TestJob(10000);
+            jobs[i] = new Job(10000);
         }
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         for (int i = 0; i < jobs.length; i++) {
             queue.add(jobs[i]);
         }
@@ -932,7 +932,7 @@ public class TestThrottlingNHttpHandlers
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleHttpRequestHandlerResolver(new TestRequestHandler()));
+                new SimpleHttpRequestHandlerResolver(new RequestHandler()));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 
@@ -982,7 +982,7 @@ public class TestThrottlingNHttpHandlers
         assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
 
         for (int i = 0; i < jobs.length; i++) {
-            TestJob testjob = jobs[i];
+            Job testjob = jobs[i];
             testjob.waitFor();
             if (testjob.isSuccessful()) {
                 assertEquals(HttpStatus.SC_OK, testjob.getStatusCode());

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestTruncatedChunks.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestTruncatedChunks.java?rev=954402&r1=954401&r2=954402&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestTruncatedChunks.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestTruncatedChunks.java Mon Jun 14 10:16:39 2010
@@ -59,8 +59,8 @@ import org.apache.http.impl.nio.reactor.
 import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.mockup.SimpleEventListener;
 import org.apache.http.mockup.SimpleNHttpRequestHandlerResolver;
-import org.apache.http.mockup.TestHttpClientNio;
-import org.apache.http.mockup.TestHttpServerNio;
+import org.apache.http.mockup.HttpClientNio;
+import org.apache.http.mockup.HttpServerNio;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.IOControl;
@@ -185,7 +185,7 @@ public class TestTruncatedChunks extends
 
     }
 
-    static class CustomTestHttpServer extends TestHttpServerNio {
+    static class CustomTestHttpServer extends HttpServerNio {
 
         public CustomTestHttpServer(final HttpParams params) throws IOException {
             super(params);
@@ -200,7 +200,7 @@ public class TestTruncatedChunks extends
     }
 
     protected CustomTestHttpServer server;
-    protected TestHttpClientNio client;
+    protected HttpClientNio client;
 
     @Override
     protected void setUp() throws Exception {
@@ -223,7 +223,7 @@ public class TestTruncatedChunks extends
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
 
-        this.client = new TestHttpClientNio(clientParams);
+        this.client = new HttpClientNio(clientParams);
     }
 
     @Override
@@ -257,18 +257,18 @@ public class TestTruncatedChunks extends
 
     public void testTruncatedChunkException() throws Exception {
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(TestJob testjob) {
+            protected HttpRequest generateRequest(Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
 
         };
 
-        TestJob testjob = new TestJob(2000);
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Job testjob = new Job(2000);
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         queue.add(testjob);
 
         HttpProcessor serverHttpProc = new ImmutableHttpProcessor(new HttpResponseInterceptor[] {
@@ -285,7 +285,7 @@ public class TestTruncatedChunks extends
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleNHttpRequestHandlerResolver(new TestRequestHandler(true)));
+                new SimpleNHttpRequestHandlerResolver(new RequestHandler(true)));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 
@@ -310,7 +310,7 @@ public class TestTruncatedChunks extends
                             final IOException ex,
                             final NHttpConnection conn) {
                         HttpContext context = conn.getContext();
-                        TestJob testjob = (TestJob) context.getAttribute("job");
+                        Job testjob = (Job) context.getAttribute("job");
                         testjob.fail(ex.getMessage(), ex);
                     }
 
@@ -410,10 +410,10 @@ public class TestTruncatedChunks extends
 
     public void testIgnoreTruncatedChunkException() throws Exception {
 
-        NHttpRequestExecutionHandler requestExecutionHandler = new TestRequestExecutionHandler() {
+        NHttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
 
             @Override
-            protected HttpRequest generateRequest(final TestJob testjob) {
+            protected HttpRequest generateRequest(final Job testjob) {
                 String s = testjob.getPattern() + "x" + testjob.getCount();
                 return new BasicHttpRequest("GET", s);
             }
@@ -428,8 +428,8 @@ public class TestTruncatedChunks extends
 
         };
 
-        TestJob testjob = new TestJob(2000);
-        Queue<TestJob> queue = new ConcurrentLinkedQueue<TestJob>();
+        Job testjob = new Job(2000);
+        Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
         queue.add(testjob);
 
         HttpProcessor serverHttpProc = new ImmutableHttpProcessor(new HttpResponseInterceptor[] {
@@ -446,7 +446,7 @@ public class TestTruncatedChunks extends
                 this.server.getParams());
 
         serviceHandler.setHandlerResolver(
-                new SimpleNHttpRequestHandlerResolver(new TestRequestHandler(true)));
+                new SimpleNHttpRequestHandlerResolver(new RequestHandler(true)));
         serviceHandler.setEventListener(
                 new SimpleEventListener());
 



Mime
View raw message