You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/10/15 20:40:32 UTC

[tomcat] 05/05: Hack to fix failing test

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6e1b6a9a4f358132b57e795170906108b8365311
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Oct 15 21:36:52 2019 +0100

    Hack to fix failing test
---
 .../org/apache/catalina/core/TestAsyncContextStateChanges.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/org/apache/catalina/core/TestAsyncContextStateChanges.java b/test/org/apache/catalina/core/TestAsyncContextStateChanges.java
index 5df1740..dc1cde9 100644
--- a/test/org/apache/catalina/core/TestAsyncContextStateChanges.java
+++ b/test/org/apache/catalina/core/TestAsyncContextStateChanges.java
@@ -196,6 +196,16 @@ public class TestAsyncContextStateChanges extends TomcatBaseTest {
             if (endTiming == EndTiming.THREAD_AFTER_EXIT) {
                 try {
                     threadLatch.await();
+                    /*
+                     * As much as I dislike it, I don't see any easy way around
+                     * this hack. The latch above is released as the Servlet
+                     * exits but we need to wait for the post processing to
+                     * complete for the test to work as intended. In real-world
+                     * applications this does mean that there is a real chance
+                     * of an ISE. We may need to increase this delay for some CI
+                     * systems.
+                     */
+                    Thread.sleep(1000);
                 } catch (InterruptedException e) {
                     // Ignore
                 }


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