You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by sb...@apache.org on 2008/06/07 22:20:10 UTC
svn commit: r664379 -
/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
Author: sberlin
Date: Sat Jun 7 13:20:09 2008
New Revision: 664379
URL: http://svn.apache.org/viewvc?rev=664379&view=rev
Log:
give server some time to accept for testAbortAfterSocketConnect too
Modified:
httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
Modified: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java?rev=664379&r1=664378&r2=664379&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java (original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java Sat Jun 7 13:20:09 2008
@@ -627,6 +627,13 @@
throw new RuntimeException(throwRef.get());
assertFalse(conn.isOpen());
+ // Give the server a bit of time to accept the connection, but
+ // ensure that it can accept it.
+ for(int i = 0; i < 10; i++) {
+ if(localServer.getAcceptedConnectionCount() == 1)
+ break;
+ Thread.sleep(100);
+ }
assertEquals(1, localServer.getAcceptedConnectionCount());
// check that there are no connections available