Skip to content

Commit

Permalink
Another NIO2 robustness change
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1802229 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Jul 17, 2017
1 parent c015368 commit c7668b7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/org/apache/coyote/http2/TestHttp2Limits.java
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,15 @@ private void doTestPostWithTrailerHeaders(int maxTrailerCount, int maxTrailerSiz
break;
}
case CONNECTION_RESET: {
// Connection reset. Connection ID will vary so use a pattern
parser.readFrame(true);
// Connection reset
do {
// NIO2 can sometimes send window updates depending on the
// timing of the connection close
output.clearTrace();
parser.readFrame(true);
} while (output.getTrace().contains("WindowSize"));

// Connection ID will vary so use a pattern
Assert.assertThat(output.getTrace(), RegexMatcher.matchesRegex(
"0-Goaway-\\[3\\]-\\[11\\]-\\[Connection \\[\\d++\\], Stream \\[3\\], .*"));
break;
Expand Down

0 comments on commit c7668b7

Please sign in to comment.