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 c8ec2d4 Additional debug logging for gump c8ec2d4 is described below commit c8ec2d4cde3a31b0e9df9a30e7915d77ba725545 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Oct 1 11:36:36 2020 +0100 Additional debug logging for gump --- .../apache/coyote/http2/TestHttp2Section_6_1.java | 61 ++++++++++++---------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/test/org/apache/coyote/http2/TestHttp2Section_6_1.java b/test/org/apache/coyote/http2/TestHttp2Section_6_1.java index 8e3d948..32d2de9 100644 --- a/test/org/apache/coyote/http2/TestHttp2Section_6_1.java +++ b/test/org/apache/coyote/http2/TestHttp2Section_6_1.java @@ -157,37 +157,44 @@ public class TestHttp2Section_6_1 extends Http2TestBase { @Test public void testDataFrameWithZeroLengthPadding() throws Exception { - http2Connect(); + LogManager.getLogManager().getLogger("org.apache.coyote").setLevel(Level.ALL); + LogManager.getLogManager().getLogger("org.apache.tomcat.util.net").setLevel(Level.ALL); + try { + http2Connect(); - byte[] padding = new byte[0]; + byte[] padding = new byte[0]; - sendSimplePostRequest(3, padding); - readSimplePostResponse(true); + sendSimplePostRequest(3, padding); + readSimplePostResponse(true); - // The window updates for padding could occur anywhere since they - // happen on a different thread to the response. - // The connection window update is always present if there is - // padding. - String trace = output.getTrace(); - String paddingWindowUpdate = "0-WindowSize-[1]\n"; - Assert.assertTrue(trace, trace.contains(paddingWindowUpdate)); - trace = trace.replace(paddingWindowUpdate, ""); - - // The stream window update may or may not be present depending on - // timing. Remove it if present. - paddingWindowUpdate = "3-WindowSize-[1]\n"; - if (trace.contains(paddingWindowUpdate)) { + // The window updates for padding could occur anywhere since they + // happen on a different thread to the response. + // The connection window update is always present if there is + // padding. + String trace = output.getTrace(); + String paddingWindowUpdate = "0-WindowSize-[1]\n"; + Assert.assertTrue(trace, trace.contains(paddingWindowUpdate)); trace = trace.replace(paddingWindowUpdate, ""); - } - Assert.assertEquals("0-WindowSize-[127]\n" + - "3-WindowSize-[127]\n" + - "3-HeadersStart\n" + - "3-Header-[:status]-[200]\n" + - "3-Header-[content-length]-[127]\n" + - "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" + - "3-HeadersEnd\n" + - "3-Body-127\n" + - "3-EndOfStream\n", trace); + // The stream window update may or may not be present depending on + // timing. Remove it if present. + paddingWindowUpdate = "3-WindowSize-[1]\n"; + if (trace.contains(paddingWindowUpdate)) { + trace = trace.replace(paddingWindowUpdate, ""); + } + + Assert.assertEquals("0-WindowSize-[127]\n" + + "3-WindowSize-[127]\n" + + "3-HeadersStart\n" + + "3-Header-[:status]-[200]\n" + + "3-Header-[content-length]-[127]\n" + + "3-Header-[date]-[Wed, 11 Nov 2015 19:18:42 GMT]\n" + + "3-HeadersEnd\n" + + "3-Body-127\n" + + "3-EndOfStream\n", trace); + } finally { + LogManager.getLogManager().getLogger("org.apache.coyote").setLevel(Level.INFO); + LogManager.getLogManager().getLogger("org.apache.tomcat.util.net").setLevel(Level.INFO); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org