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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 099a450075 Fix test failure observed on MacOS (but could happen on any 
OS)
099a450075 is described below

commit 099a4500752a1fc9b7254f6358a66e94436a472d
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Aug 12 08:23:12 2026 +0100

    Fix test failure observed on MacOS (but could happen on any OS)
---
 test/org/apache/coyote/http2/TestHttp2Section_5_2.java | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestHttp2Section_5_2.java 
b/test/org/apache/coyote/http2/TestHttp2Section_5_2.java
index 6c26c7728f..c42d35abcb 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_5_2.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_5_2.java
@@ -134,15 +134,23 @@ public class TestHttp2Section_5_2 extends Http2TestBase {
             parser.readFrame();
         }
 
+        output.clearTrace();
+
         // Connection flow control window is now empty
 
         // Put a stream on the backlog and then immediately cancel it
         sendSimpleGetRequest(17);
         sendRst(17, Http2Error.NO_ERROR.getCode());
-        // Read headers
-        parser.readFrame();
-        // Read reset from server
+        /*
+         * There is a server side race here. The start of the response may or 
may not be received before the RST is
+         * processed. Handle both cases. Once the RST is received, no further 
frames will be received for that stream.
+         */
+        // Read headers or RST
         parser.readFrame();
+        if (output.getTrace().startsWith("17-HeadersStart")) {
+            // Read reset from server
+            parser.readFrame();
+        }
 
         // Increase default window size to 8k
         sendSettings(0, false, new SettingValue(4, 8 * 1024));


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

Reply via email to