Author: markt
Date: Mon Jul 18 15:09:43 2011
New Revision: 1147920

URL: http://svn.apache.org/viewvc?rev=1147920&view=rev
Log:
Modify the test to ensure that the default connection timeout (-1) is used and 
so that pipe-lining doesn't trigger false positive results

Modified:
    tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java

Modified: tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1147920&r1=1147919&r2=1147920&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Mon 
Jul 18 15:09:43 2011
@@ -46,6 +46,7 @@ public class TestAbstractAjpProcessor ex
     
     public void testKeepAlive() throws Exception {
         Tomcat tomcat = getTomcatInstance();
+        tomcat.getConnector().setProperty("connectionTimeout", "-1");
         tomcat.start();
 
         // Must have a real docBase - just use temp
@@ -73,6 +74,9 @@ public class TestAbstractAjpProcessor ex
             validateResponseBody(responseBody, 
HelloWorldServlet.RESPONSE_TEXT);
             validateResponseEnd(ajpClient.readMessage(), true);
             
+            // Give connections plenty of time to time out
+            Thread.sleep(2000);
+            
             // Double check the connection is still open
             validateCpong(ajpClient.cping());
         }



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

Reply via email to