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 a8bffcbf55624ba14819dfc636f2e63dd1a8289d 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 c95c62e8cb..953aa9a759 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; @@ -673,7 +674,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