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 22580d9d02 More robustness improvements
22580d9d02 is described below

commit 22580d9d02268f9f9b313c525e81a738e5f95269
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 21 11:17:49 2026 +0100

    More robustness improvements
---
 .../apache/coyote/http2/TestHttp2Section_8_1.java  | 31 ++++++++++++++++++----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java 
b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
index 1ec30fa560..2f9d32a7fb 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
@@ -626,6 +626,7 @@ public class TestHttp2Section_8_1 extends Http2TestBase {
             }
         }
         Assert.assertTrue(output.getTrace(), 
output.getTrace().contains("3-RST-[1]"));
+        output.clearTrace();
 
         // Ensure connection is still valid
         sendSimpleGetRequest(5);
@@ -706,17 +707,37 @@ public class TestHttp2Section_8_1 extends Http2TestBase {
 
         writeFrame(dataFrameHeader, dataPayload);
 
-        // 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
-        parser.readFrame();
+        // 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;
+            }
+        }
         // Read body
         parser.readFrame();
         Assert.assertEquals(getSimpleResponseTrace(5), output.getTrace());


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

Reply via email to