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
The following commit(s) were added to refs/heads/8.5.x by this push: new 0c850f1 Fix HTTP/2 tests broken by changes to small window update frames 0c850f1 is described below commit 0c850f1e935e3c127929fb2c9e1856daf696151a Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jun 15 09:16:31 2021 +0100 Fix HTTP/2 tests broken by changes to small window update frames --- test/org/apache/coyote/http2/TestHttp2Limits.java | 2 ++ test/org/apache/coyote/http2/TestHttp2Section_6_1.java | 10 ++++++++++ test/org/apache/coyote/http2/TestHttp2Section_6_9.java | 3 +++ test/org/apache/coyote/http2/TestHttp2Section_8_1.java | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/test/org/apache/coyote/http2/TestHttp2Limits.java b/test/org/apache/coyote/http2/TestHttp2Limits.java index 07ff7ed..957c747 100644 --- a/test/org/apache/coyote/http2/TestHttp2Limits.java +++ b/test/org/apache/coyote/http2/TestHttp2Limits.java @@ -474,6 +474,8 @@ public class TestHttp2Limits extends Http2TestBase { http2Protocol.setAllowedTrailerHeaders(TRAILER_HEADER_NAME); http2Protocol.setMaxTrailerCount(maxTrailerCount); http2Protocol.setMaxTrailerSize(maxTrailerSize); + // Disable overhead protection for window update as it breaks some tests + http2Protocol.setOverheadWindowUpdateThreshold(0); configureAndStartWebApplication(); openClientConnection(); diff --git a/test/org/apache/coyote/http2/TestHttp2Section_6_1.java b/test/org/apache/coyote/http2/TestHttp2Section_6_1.java index 8e3d948..27a6223 100644 --- a/test/org/apache/coyote/http2/TestHttp2Section_6_1.java +++ b/test/org/apache/coyote/http2/TestHttp2Section_6_1.java @@ -35,6 +35,9 @@ public class TestHttp2Section_6_1 extends Http2TestBase { public void testDataFrame() throws Exception { http2Connect(); + // Disable overhead protection for window update as it breaks the test + http2Protocol.setOverheadWindowUpdateThreshold(0); + sendSimplePostRequest(3, null); readSimplePostResponse(false); @@ -57,6 +60,10 @@ public class TestHttp2Section_6_1 extends Http2TestBase { try { http2Connect(); + // Disable overhead protection for window update as it breaks the + // test + http2Protocol.setOverheadWindowUpdateThreshold(0); + byte[] padding = new byte[8]; sendSimplePostRequest(3, padding); @@ -159,6 +166,9 @@ public class TestHttp2Section_6_1 extends Http2TestBase { public void testDataFrameWithZeroLengthPadding() throws Exception { http2Connect(); + // Disable overhead protection for window update as it breaks the test + http2Protocol.setOverheadWindowUpdateThreshold(0); + byte[] padding = new byte[0]; sendSimplePostRequest(3, padding); diff --git a/test/org/apache/coyote/http2/TestHttp2Section_6_9.java b/test/org/apache/coyote/http2/TestHttp2Section_6_9.java index 02d24eb..dd77220 100644 --- a/test/org/apache/coyote/http2/TestHttp2Section_6_9.java +++ b/test/org/apache/coyote/http2/TestHttp2Section_6_9.java @@ -152,6 +152,9 @@ public class TestHttp2Section_6_9 extends Http2TestBase { public void testWindowSizeAndSettingsFrame() throws Exception { http2Connect(); + // Disable overhead protection for window update as it breaks the test + http2Protocol.setOverheadWindowUpdateThreshold(0); + // Set up a POST request that echoes the body back byte[] headersFrameHeader = new byte[9]; ByteBuffer headersPayload = ByteBuffer.allocate(128); diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java index 83a831f..da694e4 100644 --- a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java +++ b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java @@ -54,6 +54,9 @@ public class TestHttp2Section_8_1 extends Http2TestBase { http2Protocol.setAllowedTrailerHeaders(TRAILER_HEADER_NAME); } + // Disable overhead protection for window update as it breaks some tests + http2Protocol.setOverheadWindowUpdateThreshold(0); + byte[] headersFrameHeader = new byte[9]; ByteBuffer headersPayload = ByteBuffer.allocate(128); byte[] dataFrameHeader = new byte[9]; @@ -135,6 +138,9 @@ public class TestHttp2Section_8_1 extends Http2TestBase { // Request verify that the various policies are implemented. http2Connect(); + // Disable overhead protection for window update as it breaks some tests + http2Protocol.setOverheadWindowUpdateThreshold(0); + byte[] headersFrameHeader = new byte[9]; ByteBuffer headersPayload = ByteBuffer.allocate(128); byte[] dataFrameHeader = new byte[9]; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org