hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1774763 - /httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http/Http1IntegrationTest.java
Date Sat, 17 Dec 2016 14:35:32 GMT
Author: olegk
Date: Sat Dec 17 14:35:32 2016
New Revision: 1774763

URL: http://svn.apache.org/viewvc?rev=1774763&view=rev
Log:
Longer timeout for long running requests

Modified:
    httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http/Http1IntegrationTest.java

Modified: httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http/Http1IntegrationTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http/Http1IntegrationTest.java?rev=1774763&r1=1774762&r2=1774763&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http/Http1IntegrationTest.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http/Http1IntegrationTest.java
Sat Dec 17 14:35:32 2016
@@ -149,6 +149,7 @@ public class Http1IntegrationTest extend
     }
 
     private static final long TIMEOUT = 5;
+    private static final long LONG_TIMEOUT = 25;
 
     private Http1TestClient client;
 
@@ -344,7 +345,7 @@ public class Http1IntegrationTest extend
         }
         while (!queue.isEmpty()) {
             final Future<Message<HttpResponse, String>> future = queue.remove();
-            final Message<HttpResponse, String> result = future.get(TIMEOUT, TimeUnit.SECONDS);
+            final Message<HttpResponse, String> result = future.get(LONG_TIMEOUT, TimeUnit.SECONDS);
             Assert.assertNotNull(result);
             final HttpResponse response = result.getHead();
             Assert.assertNotNull(response);
@@ -868,7 +869,7 @@ public class Http1IntegrationTest extend
         }
         while (!queue.isEmpty()) {
             final Future<Message<HttpResponse, String>> future = queue.remove();
-            final Message<HttpResponse, String> result = future.get(5 * TIMEOUT, TimeUnit.SECONDS);
+            final Message<HttpResponse, String> result = future.get(LONG_TIMEOUT, TimeUnit.SECONDS);
             Assert.assertNotNull(result);
             final HttpResponse response = result.getHead();
             Assert.assertNotNull(response);
@@ -1007,7 +1008,7 @@ public class Http1IntegrationTest extend
                 }),
                 null);
 
-        final Message<HttpResponse, String> result1 = future1.get(5 * TIMEOUT, TimeUnit.SECONDS);
+        final Message<HttpResponse, String> result1 = future1.get(LONG_TIMEOUT, TimeUnit.SECONDS);
         Assert.assertNotNull(result1);
         final HttpResponse response1 = result1.getHead();
         Assert.assertNotNull(response1);
@@ -1063,7 +1064,7 @@ public class Http1IntegrationTest extend
 
                 }),
                 new BasicResponseConsumer<>(new StringAsyncEntityConsumer()), null);
-        final Message<HttpResponse, String> result1 = future1.get(5 * TIMEOUT, TimeUnit.SECONDS);
+        final Message<HttpResponse, String> result1 = future1.get(LONG_TIMEOUT, TimeUnit.SECONDS);
         Assert.assertNotNull(result1);
         final HttpResponse response1 = result1.getHead();
         Assert.assertNotNull(response1);
@@ -1147,7 +1148,7 @@ public class Http1IntegrationTest extend
         final Future<Message<HttpResponse, String>> future1 = streamEndpoint.execute(
                 new BasicRequestProducer(request1, new MultiLineEntityProducer("0123456789abcd",
2000)),
                 new BasicResponseConsumer<>(new StringAsyncEntityConsumer()), null);
-        final Message<HttpResponse, String> result1 = future1.get(5 * TIMEOUT, TimeUnit.SECONDS);
+        final Message<HttpResponse, String> result1 = future1.get(LONG_TIMEOUT, TimeUnit.SECONDS);
         Assert.assertNotNull(result1);
         final HttpResponse response1 = result1.getHead();
         Assert.assertNotNull(response1);



Mime
View raw message