You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/10/01 10:46:01 UTC
[tomcat] branch 8.5.x updated: Additional debug logging for gump
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 11e5a71 Additional debug logging for gump
11e5a71 is described below
commit 11e5a713f71540d0ca6ad060d79b452cb81660d0
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org