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

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

commit 0be993676482b00af8edc1cb7f12f0ab292bfea6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 25 14:48:30 2024 +0000

    Update tests after HTTP/2 improvements
---
 test/org/apache/coyote/http2/TestHttp2Limits.java | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestHttp2Limits.java 
b/test/org/apache/coyote/http2/TestHttp2Limits.java
index 056d928dbd..5e916528f7 100644
--- a/test/org/apache/coyote/http2/TestHttp2Limits.java
+++ b/test/org/apache/coyote/http2/TestHttp2Limits.java
@@ -164,7 +164,7 @@ public class TestHttp2Limits extends Http2TestBase {
         // 500ms per frame write delay to give server a chance to process the
         // stream reset and the connection reset before the request is fully
         // sent.
-        doTestHeaderLimits(1, 32 * 1024, 1024, 500, 
FailureMode.CONNECTION_RESET);
+        doTestHeaderLimits(1, 32 * 1024, 1024, 500, 
FailureMode.STREAM_RESET_THEN_CONNECTION_RESET);
     }
 
 
@@ -278,6 +278,13 @@ public class TestHttp2Limits extends Http2TestBase {
                 Assert.assertNull(e);
                 break;
             }
+            case STREAM_RESET_THEN_CONNECTION_RESET: {
+                // Expect a stream reset
+                parser.readFrame();
+                Assert.assertEquals("3-RST-[11]\n", output.getTrace());
+                output.clearTrace();
+            }
+                //$FALL-THROUGH$
             case CONNECTION_RESET: {
                 // This message uses i18n and needs to be used in a regular
                 // expression (since we don't know the connection ID). 
Generate the
@@ -522,6 +529,10 @@ public class TestHttp2Limits extends Http2TestBase {
                 Assert.assertEquals("3-RST-[11]\n", output.getTrace());
                 break;
             }
+            case STREAM_RESET_THEN_CONNECTION_RESET: {
+                Assert.fail("Not used");
+                break;
+            }
             case CONNECTION_RESET: {
                 // NIO2 can sometimes send window updates depending timing
                 skipWindowSizeFrames();
@@ -544,7 +555,7 @@ public class TestHttp2Limits extends Http2TestBase {
         NONE,
         STREAM_RESET,
         CONNECTION_RESET,
-
+        STREAM_RESET_THEN_CONNECTION_RESET,
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to