Modify the test to ensure that the default connection timeout (-1) is used and so...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 18 Jul 2011 15:09:43 +0000 (15:09 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 18 Jul 2011 15:09:43 +0000 (15:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1147920 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java

index 02b7428..54e6d81 100644 (file)
@@ -46,6 +46,7 @@ public class TestAbstractAjpProcessor extends TomcatBaseTest {
     
     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 extends TomcatBaseTest {
             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());
         }