This is an automated email from the ASF dual-hosted git repository. markt-asf pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit fbd9b59391b2a0aaca70edb3c0636286583e0298 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]
