hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1780655 - /httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsync.java
Date Sat, 28 Jan 2017 10:39:27 GMT
Author: olegk
Date: Sat Jan 28 10:39:27 2017
New Revision: 1780655

URL: http://svn.apache.org/viewvc?rev=1780655&view=rev
Log:
Multiple HEAD integration test

Modified:
    httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsync.java

Modified: httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsync.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsync.java?rev=1780655&r1=1780654&r2=1780655&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsync.java
(original)
+++ httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsync.java
Sat Jan 28 10:39:27 2017
@@ -35,6 +35,7 @@ import java.util.Random;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
+import org.apache.http.client.methods.HttpHead;
 import org.apache.http.localserver.HttpAsyncTestBase;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
@@ -93,6 +94,18 @@ public class TestHttpAsync extends HttpA
     }
 
     @Test
+    public void testMultipleHead() throws Exception {
+        final HttpHost target = start();
+        for (int i = 0; i < 3; i++) {
+            final HttpHead httpHead = new HttpHead("/random/2048");
+            final Future<HttpResponse> future = this.httpclient.execute(target, httpHead,
null);
+            final HttpResponse response = future.get();
+            Assert.assertNotNull(response);
+            Assert.assertEquals(200, response.getStatusLine().getStatusCode());
+        }
+    }
+
+    @Test
     public void testSinglePost() throws Exception {
         final HttpHost target = start();
         final byte[] b1 = new byte[1024];



Mime
View raw message