From: markt Date: Mon, 18 Jul 2011 15:09:43 +0000 (+0000) Subject: Modify the test to ensure that the default connection timeout (-1) is used and so... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=78b0c54f3f110d55a638142ab5ac2737fd9e35a1;p=tomcat7.0 Modify the test to ensure that the default connection timeout (-1) is used and so that pipe-lining doesn't trigger false positive results git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1147920 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java b/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java index 02b7428e4..54e6d8116 100644 --- a/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java +++ b/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java @@ -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()); }