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
The following commit(s) were added to refs/heads/main by this push:
new e6f4ddd8b0 Fix another intermittent test failure
e6f4ddd8b0 is described below
commit e6f4ddd8b0cda917da091a939385570cb33dfa01
Author: Mark Thomas <[email protected]>
AuthorDate: Sat Nov 7 16:55:25 2026 +0000
Fix another intermittent test failure
Co-authored by: Claude / Sonnet 5.5
---
.../org/apache/coyote/http2/TestHttp2Section_6_5.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_6_5.java
b/test/org/apache/coyote/http2/TestHttp2Section_6_5.java
index 4d6cf6dbcf..7b19c1c288 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_6_5.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_6_5.java
@@ -16,6 +16,7 @@
*/
package org.apache.coyote.http2;
+import java.net.SocketException;
import java.net.SocketTimeoutException;
import org.junit.Assert;
@@ -48,12 +49,20 @@ public class TestHttp2Section_6_5 extends Http2TestBase {
readSimpleGetResponse();
output.clearTrace();
- // Unsolicited, empty SETTINGS ACK frames
- for (int i = 0; i < 100; i++) {
- sendSettings(0, true);
- }
+ /*
+ * Unsolicited, empty SETTINGS ACK frames. The server may close the
connection before all of the frames (or the
+ * following GET request) have been written so a write failure is not
an error. The GOAWAY check below is what
+ * determines the test result.
+ */
+ try {
+ for (int i = 0; i < 100; i++) {
+ sendSettings(0, true);
+ }
- sendSimpleGetRequest(5);
+ sendSimpleGetRequest(5);
+ } catch (SocketException se) {
+ // Expected if the server closed the connection early
+ }
/*
* Expect the server to close the connection with ENHANCE_YOUR_CALM.
The response to the second GET request may
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]