Skip to content

Commit

Permalink
Additional debug logging after CI test failure
Browse files Browse the repository at this point in the history
Log the full trace before clearing it so the logs have the full picture
of what was received.
  • Loading branch information
markt-asf committed Jul 27, 2023
1 parent ca06a33 commit 5cd6da7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/org/apache/coyote/http2/TestRfc9218.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ public void testPriority() throws Exception {
readSimpleGetResponse();
}

String trace = output.getTrace();
System.out.println(trace);
output.clearTrace();

// At this point the connection window should be 1k

// Process a request on stream 17. This should consume the connection window.
sendSimpleGetRequest(17);
// 17-headers, 17-1k-body
parser.readFrame();
parser.readFrame();
trace = output.getTrace();
System.out.println(trace);
output.clearTrace();

// Send additional requests. Connection window is empty so only headers will be returned.
Expand All @@ -59,6 +65,8 @@ public void testPriority() throws Exception {
// 19-headers, 21-headers
parser.readFrame();
parser.readFrame();
trace = output.getTrace();
System.out.println(trace);
output.clearTrace();

// At this point 17, 19 and 21 are all blocked because the connection window is zero.
Expand Down Expand Up @@ -102,7 +110,7 @@ public void testPriority() throws Exception {
parser.readFrame();
parser.readFrame();

String trace = output.getTrace();
trace = output.getTrace();
Assert.assertTrue(trace.contains("17-Body-877\n"));
trace = trace.replace("17-Body-877\n", "");
Assert.assertTrue(trace.contains("19-Body-1170\n"));
Expand Down

0 comments on commit 5cd6da7

Please sign in to comment.