From 6bcb8e0b5f3026acd900a6e0d1015141568b0074 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Fri, 9 Aug 2013 08:24:21 +0000 Subject: [PATCH] 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 --- .../impl/conn/TestBasicHttpClientConnectionManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java b/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java index 01be679d7..650534afb 100644 --- a/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java +++ b/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java @@ -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);