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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new ac31b7e12d Improve test robustness in failure cases (it would hang 
forever)
ac31b7e12d is described below

commit ac31b7e12d2e4fb15298e5c8a1e2ffca9f05c7d4
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Apr 23 10:54:49 2026 +0100

    Improve test robustness in failure cases (it would hang forever)
---
 test/org/apache/coyote/http2/TestLargeUpload.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/TestLargeUpload.java 
b/test/org/apache/coyote/http2/TestLargeUpload.java
index ad509baa42..d82c82fb4e 100644
--- a/test/org/apache/coyote/http2/TestLargeUpload.java
+++ b/test/org/apache/coyote/http2/TestLargeUpload.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import jakarta.servlet.ServletException;
 import jakarta.servlet.http.HttpServletRequest;
@@ -109,7 +110,11 @@ public class TestLargeUpload extends Http2TestBase {
         // Trailers
         writeFrame(trailerFrameHeader, trailerPayload);
 
-        done.await();
+        /*
+         * Should complete very quickly (sub-second). Use timeout in case 
something fails. Long time out as some CI
+         * systems occasionally have long pauses.
+         */
+        done.await(30, TimeUnit.SECONDS);
         Assert.assertEquals(Integer.valueOf(bodySize * bodyCount), 
Integer.valueOf(read));
 
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to