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 fa3a11d2c5 Try and make test more robust
fa3a11d2c5 is described below

commit fa3a11d2c5f66722db917c680e6530a971f4afa4
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 21 11:04:28 2026 +0100

    Try and make test more robust
---
 .../apache/coyote/http2/TestHttp2Section_8_1.java  | 24 +++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java 
b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
index 1f49c322c1..1ec30fa560 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
@@ -614,21 +614,31 @@ public class TestHttp2Section_8_1 extends Http2TestBase {
         trailerFrameHeader[4] = 0x04;
         writeFrame(trailerFrameHeader, trailerPayload);
 
-        // Expect 2 window updates and a reset due to a protocol error - any 
order
-        parser.readFrame();
-        parser.readFrame();
-        parser.readFrame();
+        // Expect 2 window updates and a reset due to a protocol error. Order 
may vary.
+        boolean skip = true;
+        while (skip) {
+            parser.readFrame();
+            if (output.getTrace().contains("WindowSize")) {
+                // Ignore the window updates
+                output.clearTrace();
+            } else {
+                skip = false;
+            }
+        }
         Assert.assertTrue(output.getTrace(), 
output.getTrace().contains("3-RST-[1]"));
-        output.clearTrace();
 
         // Ensure connection is still valid
         sendSimpleGetRequest(5);
         // Read headers
-        // In async mode, may see multiple resets for Stream 3
-        boolean skip = true;
+        // In async mode, may see multiple resets for Stream 3 and/or further 
window updates
+        skip = true;
         while (skip) {
             parser.readFrame();
             if (output.getTrace().startsWith("3-RST")) {
+                // Ignore additional resets for stream 3
+                output.clearTrace();
+            } else if (output.getTrace().contains("WindowSize")) {
+                // Ignore the window updates
                 output.clearTrace();
             } else {
                 skip = false;


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

Reply via email to