hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1153911 - /httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
Date Thu, 04 Aug 2011 15:39:24 GMT
Author: olegk
Date: Thu Aug  4 15:39:23 2011
New Revision: 1153911

URL: http://svn.apache.org/viewvc?rev=1153911&view=rev
Log:
Increased sleep time in some test cases currently failing when executed on Windows

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

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java?rev=1153911&r1=1153910&r2=1153911&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
Thu Aug  4 15:39:23 2011
@@ -300,7 +300,7 @@ public class TestConnPoolByRoute extends
         useMockOperator();
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1,
TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
-        Thread.sleep(2);
+        Thread.sleep(200L);
         impl.closeIdleConnections(1, TimeUnit.MILLISECONDS);
         verify(mockConnection, atLeastOnce()).close();
     }
@@ -320,7 +320,7 @@ public class TestConnPoolByRoute extends
         useMockOperator();
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1,
TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, 1, TimeUnit.MILLISECONDS);
-        Thread.sleep(2);
+        Thread.sleep(200L);
         impl.closeExpiredConnections();
         verify(mockConnection, atLeastOnce()).close();
     }
@@ -329,8 +329,8 @@ public class TestConnPoolByRoute extends
     public void closeExpiredConnectionsDoesNotCloseUnexpiredOnes() throws Exception {
         useMockOperator();
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1,
TimeUnit.MILLISECONDS);
-        impl.freeEntry(entry, true, 10, TimeUnit.MILLISECONDS);
-        Thread.sleep(1);
+        impl.freeEntry(entry, true, 10, TimeUnit.SECONDS);
+        Thread.sleep(200L);
         impl.closeExpiredConnections();
         verify(mockConnection, never()).close();
     }
@@ -405,7 +405,7 @@ public class TestConnPoolByRoute extends
         when(mockOperator.createConnection()).thenReturn(mockConnection, mockConnection2);
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1,
TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, 1, TimeUnit.MILLISECONDS);
-        Thread.sleep(2);
+        Thread.sleep(200L);
         BasicPoolEntry entry2 = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1,
TimeUnit.MILLISECONDS);
         assertNotSame(mockConnection, entry2.getConnection());
     }
@@ -416,7 +416,7 @@ public class TestConnPoolByRoute extends
         when(mockOperator.createConnection()).thenReturn(mockConnection, mockConnection2);
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1,
TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, 1, TimeUnit.MILLISECONDS);
-        Thread.sleep(2);
+        Thread.sleep(200L);
         impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         verify(mockConnection, atLeastOnce()).close();
     }



Mime
View raw message