You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2011/08/04 17:39:24 UTC
svn commit: r1153911 -
/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
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();
}