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
The following commit(s) were added to refs/heads/9.0.x by this push: new 1265e0199d Improve performance of HTTP/2 tests 1265e0199d is described below commit 1265e0199d602ae3e3f90b1283e280dea4247eaf Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Dec 5 12:16:18 2023 +0000 Improve performance of HTTP/2 tests --- test/org/apache/coyote/http2/Http2TestBase.java | 3 ++- test/org/apache/coyote/http2/TestHttp2Section_4_2.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/org/apache/coyote/http2/Http2TestBase.java b/test/org/apache/coyote/http2/Http2TestBase.java index 869881fac4..9341ea68b6 100644 --- a/test/org/apache/coyote/http2/Http2TestBase.java +++ b/test/org/apache/coyote/http2/Http2TestBase.java @@ -16,6 +16,7 @@ */ package org.apache.coyote.http2; +import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -642,7 +643,7 @@ public abstract class Http2TestBase extends TomcatBaseTest { s = socketFactory.createSocket("localhost", getPort()); s.setSoTimeout(30000); - os = s.getOutputStream(); + os = new BufferedOutputStream(s.getOutputStream()); InputStream is = s.getInputStream(); input = new TestInput(is); diff --git a/test/org/apache/coyote/http2/TestHttp2Section_4_2.java b/test/org/apache/coyote/http2/TestHttp2Section_4_2.java index 3c158c724d..d73a2495a7 100644 --- a/test/org/apache/coyote/http2/TestHttp2Section_4_2.java +++ b/test/org/apache/coyote/http2/TestHttp2Section_4_2.java @@ -51,6 +51,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase { } os.write(settings); + os.flush(); handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR); } @@ -73,6 +74,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase { // Empty payload os.write(ping); + os.flush(); handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR); } @@ -95,6 +97,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase { // Empty payload os.write(ping); + os.flush(); handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR); } @@ -118,6 +121,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase { // Empty payload os.write(priority); + os.flush(); // Read Stream reset frame parser.readFrame(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org