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

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


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 2d38c9956c Speed up test.
2d38c9956c is described below

commit 2d38c9956c8375270af628bd342d82495f792c4e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 30 17:04:41 2025 +0000

    Speed up test.
    
    Fully reading body means Tomcat doesn't hang on shutdown waiting for the
    writes to complete.
---
 test/org/apache/coyote/http2/TestRfc9218.java | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestRfc9218.java 
b/test/org/apache/coyote/http2/TestRfc9218.java
index 6cfd557022..eb9256d2a1 100644
--- a/test/org/apache/coyote/http2/TestRfc9218.java
+++ b/test/org/apache/coyote/http2/TestRfc9218.java
@@ -151,7 +151,7 @@ public class TestRfc9218 extends Http2TestBase {
 
         /*
          * Add 8k to the connection window. Should clear the connection window 
over allocation and fully allocate 17
-         * with the remainder split equally between 17 and 21.
+         * with the remainder split proportionally between 19 and 21.
          */
         sendWindowUpdate(0, 1024 * 8);
         // Use try/catch as third read has been failing on some tests runs
@@ -177,6 +177,18 @@ public class TestRfc9218 extends Http2TestBase {
         trace = trace.replace("21-Body-1365\n", "");
         Assert.assertEquals(0, trace.length());
 
-        // Test doesn't read the read of the body for streams 19 and 21.
+        // 19 - 5641 body left
+        // 21 - 4778 body left
+
+        // Add 16k to the connection window. Should fully allocate 19 and 21.
+        sendWindowUpdate(0, 1024 * 16);
+
+        try {
+            parser.readFrame();
+            parser.readFrame();
+        } catch (IOException ioe) {
+            // Dump for debugging purposes
+            ioe.printStackTrace();
+        }
     }
 }


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

Reply via email to