From: markt Date: Mon, 15 Aug 2011 13:52:18 +0000 (+0000) Subject: Also seeing similar failures with NIO & APR X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=210a8efd75e1d1004019cea37085f5e8555aafb3;p=tomcat7.0 Also seeing similar failures with NIO & APR git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1157847 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/core/TestStandardContextValve.java b/test/org/apache/catalina/core/TestStandardContextValve.java index 78bb50854..87fb50f4d 100644 --- a/test/org/apache/catalina/core/TestStandardContextValve.java +++ b/test/org/apache/catalina/core/TestStandardContextValve.java @@ -121,6 +121,17 @@ public class TestStandardContextValve extends TomcatBaseTest { int rc = getUrl("http://localhost:" + getPort() + "/test", new ByteChunk(), null); + // Need to allow time (but not too long in case the test fails) for + // ServletRequestListener to complete + int i = 20; + while (i > 0) { + if (trace.toString().endsWith("Destroy")) { + break; + } + Thread.sleep(250); + i--; + } + assertEquals(Response.SC_NOT_FOUND, rc); assertEquals("InitErrorDestroy", trace.toString()); }