tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1848966 - /tomcat/trunk/test/org/apache/coyote/http2/
Date Fri, 14 Dec 2018 18:50:59 GMT
Author: markt
Date: Fri Dec 14 18:50:58 2018
New Revision: 1848966

URL: http://svn.apache.org/viewvc?rev=1848966&view=rev
Log:
Fix failing HTTP/2 tests after content-length change

Modified:
    tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_9.java
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2UpgradeHandler.java
    tomcat/trunk/test/org/apache/coyote/http2/TestStream.java
    tomcat/trunk/test/org/apache/coyote/http2/TestStreamQueryString.java

Modified: tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java Fri Dec 14 18:50:58 2018
@@ -443,15 +443,15 @@ public abstract class Http2TestBase exte
 
     protected String getCookieResponseTrace(int streamId, int cookieCount) {
         return getResponseBodyFrameTrace(streamId, "text/plain;charset=UTF-8",
-                "Cookie count: " + cookieCount);
+                "Cookie count: " + cookieCount, null);
     }
 
 
     private String getResponseBodyFrameTrace(int streamId, String body) {
-        return getResponseBodyFrameTrace(streamId, "application/octet-stream", body);
+        return getResponseBodyFrameTrace(streamId, "application/octet-stream", body, body);
     }
 
-    private String getResponseBodyFrameTrace(int streamId, String contentType, String body)
{
+    private String getResponseBodyFrameTrace(int streamId, String contentType, String body,
String cl) {
         StringBuilder result = new StringBuilder();
         result.append(streamId);
         result.append("-HeadersStart\n");
@@ -461,6 +461,12 @@ public abstract class Http2TestBase exte
         result.append("-Header-[content-type]-[");
         result.append(contentType);
         result.append("]\n");
+        if (cl != null) {
+            result.append(streamId);
+            result.append("-Header-[content-length]-[");
+            result.append(cl);
+            result.append("]\n");
+        }
         result.append(streamId);
         result.append("-Header-[date]-[");
         result.append(DEFAULT_DATE);

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java Fri Dec 14 18:50:58 2018
@@ -474,6 +474,7 @@ public class TestHttp2Limits extends Htt
                     "3-WindowSize-[256]\n" +
                     "3-HeadersStart\n" +
                     "3-Header-[:status]-[200]\n" +
+                    "3-Header-[content-length]-[" + len + "]\n" +
                     "3-Header-[date]-["+ DEFAULT_DATE + "]\n" +
                     "3-HeadersEnd\n" +
                     "3-Body-" +

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java Fri Dec 14 18:50:58
2018
@@ -39,6 +39,7 @@ public class TestHttp2Section_6_1 extend
                 "3-WindowSize-[128]\n" +
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
+                "3-Header-[content-length]-[128]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-128\n" +
@@ -68,6 +69,7 @@ public class TestHttp2Section_6_1 extend
                 "3-WindowSize-[119]\n" +
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
+                "3-Header-[content-length]-[119]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-119\n" +
@@ -151,6 +153,7 @@ public class TestHttp2Section_6_1 extend
                 "3-WindowSize-[127]\n" +
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
+                "3-Header-[content-length]-[127]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-127\n" +

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_9.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_9.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_9.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_9.java Fri Dec 14 18:50:58
2018
@@ -227,6 +227,7 @@ public class TestHttp2Section_6_9 extend
         Assert.assertEquals(
                 "5-HeadersStart\n" +
                 "5-Header-[:status]-[200]\n" +
+                "5-Header-[content-length]-[128]\n" +
                 "5-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "5-HeadersEnd\n" +
                 "5-Body-128\n" +

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_8_1.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_8_1.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_8_1.java Fri Dec 14 18:50:58
2018
@@ -85,6 +85,7 @@ public class TestHttp2Section_8_1 extend
                 "3-WindowSize-[256]\n" +
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
+                "3-Header-[content-length]-[" + len + "]\n" +
                 "3-Header-[date]-["+ DEFAULT_DATE + "]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-" +
@@ -130,6 +131,7 @@ public class TestHttp2Section_8_1 extend
                 "3-WindowSize-[256]\n" +
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
+                "3-Header-[content-length]-[256]\n" +
                 "3-Header-[date]-["+ DEFAULT_DATE + "]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-256\n" +

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2UpgradeHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2UpgradeHandler.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2UpgradeHandler.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2UpgradeHandler.java Fri Dec 14 18:50:58
2018
@@ -62,6 +62,7 @@ public class TestHttp2UpgradeHandler ext
                 "3-Header-[:status]-[200]\n" +
                 "3-Header-[x-ignore]-[...]\n" +
                 "3-Header-[content-type]-[text/plain;charset=UTF-8]\n" +
+                "3-Header-[content-length]-[2]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-2\n" +

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestStream.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestStream.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestStream.java Fri Dec 14 18:50:58 2018
@@ -70,6 +70,7 @@ public class TestStream extends Http2Tes
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
                 "3-Header-[content-type]-[text/plain;charset=UTF-8]\n" +
+                "3-Header-[content-length]-[2]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-2\n" +
@@ -113,6 +114,7 @@ public class TestStream extends Http2Tes
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
                 "3-Header-[content-type]-[text/plain;charset=UTF-8]\n" +
+                "3-Header-[content-length]-[44]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-44\n" +

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestStreamQueryString.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestStreamQueryString.java?rev=1848966&r1=1848965&r2=1848966&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestStreamQueryString.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestStreamQueryString.java Fri Dec 14 18:50:58
2018
@@ -97,6 +97,7 @@ public class TestStreamQueryString exten
                 "3-HeadersStart\n" +
                 "3-Header-[:status]-[200]\n" +
                 "3-Header-[content-type]-[text/plain;charset=UTF-8]\n" +
+                "3-Header-[content-length]-[2]\n" +
                 "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" +
                 "3-HeadersEnd\n" +
                 "3-Body-2\n" +



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


Mime
View raw message