hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sber...@apache.org
Subject svn commit: r664379 - /httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
Date Sat, 07 Jun 2008 20:20:10 GMT
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



Mime
View raw message