hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1512197 - /httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java
Date Fri, 09 Aug 2013 08:24:21 GMT
Author: olegk
Date: Fri Aug  9 08:24:21 2013
New Revision: 1512197

URL: http://svn.apache.org/r1512197
Log:
An attempt at finding a work-around for a bizzare issue that affects on one unit test when
executed by Continuum CI server

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java?rev=1512197&r1=1512196&r2=1512197&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java
Fri Aug  9 08:24:21 2013
@@ -223,12 +223,15 @@ public class TestBasicHttpClientConnecti
 
         Mockito.when(conn.isOpen()).thenReturn(Boolean.TRUE, Boolean.FALSE);
 
-        mgr.releaseConnection(conn1, null, 10, TimeUnit.MILLISECONDS);
+        mgr.releaseConnection(conn1, null, 1, TimeUnit.MILLISECONDS);
 
         Assert.assertEquals(route, mgr.getRoute());
         Assert.assertEquals(null, mgr.getState());
 
-        Thread.sleep(50);
+        try {
+            Thread.sleep(50);
+        } catch (InterruptedException ignore) {
+        }
 
         final ConnectionRequest connRequest2 = mgr.requestConnection(route, null);
         final HttpClientConnection conn2 = connRequest2.get(0, TimeUnit.MILLISECONDS);



Mime
View raw message