Made the test more reliable.

This commit is contained in:
Simone Bordet 2014-04-08 13:57:55 +02:00
parent 3cd7dfd445
commit 74d66a87f6
1 changed files with 4 additions and 1 deletions

View File

@ -82,9 +82,12 @@ public class HttpClientExplicitConnectionTest extends AbstractHttpClientServerTe
Assert.assertEquals(200, response.getStatus()); Assert.assertEquals(200, response.getStatus());
// Wait some time to have the client is an idle state.
TimeUnit.SECONDS.sleep(1);
connector.stop(); connector.stop();
// Give the connection some time to process the remote close // Give the connection some time to process the remote close.
TimeUnit.SECONDS.sleep(1); TimeUnit.SECONDS.sleep(1);
HttpConnectionOverHTTP httpConnection = (HttpConnectionOverHTTP)connection; HttpConnectionOverHTTP httpConnection = (HttpConnectionOverHTTP)connection;