(tomcat) 03/03: Update tests after HTTP/2 improvements
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 AuthorDate: Thu Jan 25 14:48:30 2024 + 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
(tomcat) 03/03: Update tests after HTTP/2 improvements
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 7be21696bf31a19828168de3db94767030d69ec6 Author: Mark Thomas AuthorDate: Thu Jan 25 14:48:30 2024 + 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 b3214eb012..7b891fbfff 100644 --- a/test/org/apache/coyote/http2/TestHttp2Limits.java +++ b/test/org/apache/coyote/http2/TestHttp2Limits.java @@ -165,7 +165,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); } @@ -279,6 +279,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 @@ -523,6 +530,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(); @@ -545,7 +556,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
(tomcat) 03/03: Update tests after HTTP/2 improvements
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit df1114c74fb2a95c074a3dc05f251867f58ddf97 Author: Mark Thomas AuthorDate: Thu Jan 25 14:48:30 2024 + 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
(tomcat) 03/03: Update tests after HTTP/2 improvements
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 4bacb383665bb3cdd0cec1293ac275999123a9dc Author: Mark Thomas AuthorDate: Thu Jan 25 14:48:30 2024 + 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 b3214eb012..7b891fbfff 100644 --- a/test/org/apache/coyote/http2/TestHttp2Limits.java +++ b/test/org/apache/coyote/http2/TestHttp2Limits.java @@ -165,7 +165,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); } @@ -279,6 +279,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 @@ -523,6 +530,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(); @@ -545,7 +556,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