This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 11478ae7c1 Improve test robustness in failure cases (it would hang
forever)
11478ae7c1 is described below
commit 11478ae7c1845e8d503fa908328df4812dc577a3
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]