This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new eddb921 Fix HTTP/2 tests broken by changes to small window update
frames
eddb921 is described below
commit eddb92165cc83f17b3f0624249cc0ced79db8815
Author: Mark Thomas <[email protected]>
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 1be65cb..bd7578c 100644
--- a/test/org/apache/coyote/http2/TestHttp2Limits.java
+++ b/test/org/apache/coyote/http2/TestHttp2Limits.java
@@ -476,6 +476,8 @@ public class TestHttp2Limits extends Http2TestBase {
((AbstractHttp11Protocol<?>)
http2Protocol.getHttp11Protocol()).setAllowedTrailerHeaders(TRAILER_HEADER_NAME);
http2Protocol.setMaxTrailerCount(maxTrailerCount);
((AbstractHttp11Protocol<?>)
http2Protocol.getHttp11Protocol()).setMaxTrailerSize(maxTrailerSize);
+ // Disable overhead protection for window update as it breaks some
tests
+ http2Protocol.setOverheadWindowUpdateThreshold(0);
openClientConnection();
doHttpUpgrade();
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 dbada46..1fa2b5d 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
@@ -55,6 +55,9 @@ public class TestHttp2Section_8_1 extends Http2TestBase {
((AbstractHttp11Protocol<?>)
http2Protocol.getHttp11Protocol()).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];
@@ -136,6 +139,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: [email protected]
For additional commands, e-mail: [email protected]