An attempt at finding a work-around for a bizzare issue that affects on one unit test when executed by Continuum CI server

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1512197 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-08-09 08:24:21 +00:00
parent 7005e49c57
commit 6bcb8e0b5f
1 changed files with 5 additions and 2 deletions

View File

@ -223,12 +223,15 @@ public class TestBasicHttpClientConnectionManager {
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);