hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sber...@apache.org
Subject svn commit: r664373 - /httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
Date Sat, 07 Jun 2008 18:50:30 GMT
Author: sberlin
Date: Sat Jun  7 11:50:30 2008
New Revision: 664373

URL: http://svn.apache.org/viewvc?rev=664373&view=rev
Log:
add a delay before checking accepted connections

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=664373&r1=664372&r2=664373&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 11:50:30 2008
@@ -698,6 +698,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