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 e9e8e752ed More robustness improvements
e9e8e752ed is described below
commit e9e8e752ede42c739f3396d92cf22b980cf7eb06
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 06bd5d6b31..86b47469cd 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
@@ -625,6 +625,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);
@@ -705,17 +706,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]