tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1056310 - /tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
Date Fri, 07 Jan 2011 13:26:33 GMT
Author: markt
Date: Fri Jan  7 13:26:33 2011
New Revision: 1056310

URL: http://svn.apache.org/viewvc?rev=1056310&view=rev
Log:
Put sleep in right place for test to pass.
With acceptCount of 1 need a short delay else connections get rejected as Tomcat doesn't process
incoming connections fast enough (on 8-core machine)

Modified:
    tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java?rev=1056310&r1=1056309&r2=1056310&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java Fri Jan  7 13:26:33
2011
@@ -47,6 +47,7 @@ public class TestMaxConnections extends 
         }
         for (int i=0; i<t.length; i++) {
             t[i].start();
+            Thread.sleep(50);
         }
         for (int i=0; i<t.length; i++) {
             t[i].join();
@@ -88,7 +89,6 @@ public class TestMaxConnections extends 
         tomcat.getConnector().setProperty("maxConnections", "4");
         tomcat.getConnector().setProperty("acceptCount", "1");
         tomcat.start();
-        Thread.currentThread().sleep(2000);
     }
 
     private class TestClient extends SimpleHttpClient {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message