Disable one test validation in TestAsyncContextImpl
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Jul 2011 13:03:49 +0000 (13:03 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Jul 2011 13:03:49 +0000 (13:03 +0000)
if an AccessLogValve has been activated.

The test relies on receiving data via
StandardEngine.logAccess() which is already
handled by the other AccessLog.

By default no AccessLogValve is activated, so the
validation is still done.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1144854 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/core/TestAsyncContextImpl.java

index 146375c..efb5fa7 100644 (file)
@@ -452,8 +452,10 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 
         // Check the access log
         if (completeOnTimeout && dispatchUrl != null) {
-            validateAccessLog(alv, 1, 500, 0, TimeoutServlet.ASYNC_TIMEOUT +
-                    TIMEOUT_MARGIN + REQUEST_TIME);
+            if (!isAccessLogEnabled()) {
+                validateAccessLog(alv, 1, 500, 0, TimeoutServlet.ASYNC_TIMEOUT +
+                        TIMEOUT_MARGIN + REQUEST_TIME);
+            }
         } else {
             validateAccessLog(alv, 1, 200, TimeoutServlet.ASYNC_TIMEOUT,
                     TimeoutServlet.ASYNC_TIMEOUT + TIMEOUT_MARGIN +