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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5f744ed  Fixing flow control for zero length padding introduced an 
edge case
5f744ed is described below

commit 5f744ed20c747549b05d0cce8bd99eebf094ab85
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 7 15:30:41 2020 +0100

    Fixing flow control for zero length padding introduced an edge case
    
    Again, spotted by Travis CI
---
 test/org/apache/coyote/http2/TestCancelledUpload.java | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index 6c80d9c..5c85b65 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -79,12 +79,16 @@ public class TestCancelledUpload extends Http2TestBase {
             return;
         }
 
-        // Validate any WindowSize frames (always arrive in pairs)
+        // Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+        // timing, can see a reset rather than than stream update.
         while (output.getTrace().startsWith("0-WindowSize-[")) {
             String trace = output.getTrace();
             int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
             output.clearTrace();
             parser.readFrame(true);
+            if (output.getTrace().startsWith("3-RST-[3]\n")) {
+                return;
+            }
             Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
             output.clearTrace();
             parser.readFrame(true);
@@ -119,13 +123,19 @@ public class TestCancelledUpload extends Http2TestBase {
         // There must be a reset. There may be some WindowSize frames
         parser.readFrame(true);
 
-        // Validate any WindowSize frames (always arrive in pairs)
+        // Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+        // timing, can see a reset rather than than stream update.
         while (output.getTrace().startsWith("0-WindowSize-[")) {
             String trace = output.getTrace();
             int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
             output.clearTrace();
             parser.readFrame(true);
+            if (output.getTrace().startsWith("3-RST-[3]\n")) {
+                return;
+            }
             Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
+            output.clearTrace();
+            parser.readFrame(true);
         }
 
         // This should be the reset


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

Reply via email to