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 2017/07/17 19:59:07 UTC
svn commit: r1802204 -
/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java
Author: markt
Date: Mon Jul 17 19:59:07 2017
New Revision: 1802204
URL: http://svn.apache.org/viewvc?rev=1802204&view=rev
Log:
Handle earlier visibility of closed connection on some platforms.
Modified:
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java
Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java?rev=1802204&r1=1802203&r2=1802204&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java Mon Jul 17 19:59:07 2017
@@ -17,6 +17,7 @@
package org.apache.coyote.http2;
import java.io.IOException;
+import java.net.SocketException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
@@ -250,10 +251,16 @@ public class TestHttp2Limits extends Htt
}
case CONNECTION_RESET: {
// Connection reset. Connection ID will vary so use a pattern
- parser.readFrame(true);
- Assert.assertThat(output.getTrace(), RegexMatcher.matchesRegex(
- "0-Goaway-\\[1\\]-\\[11\\]-\\[Connection \\[\\d++\\], Stream \\[3\\], .*"));
- // e may or may not be null here
+ // On some platforms (e.g. Windows), the TCP connection close will
+ // be processed before the client gets a chance to read the
+ // connection close frame
+ try {
+ parser.readFrame(true);
+ Assert.assertThat(output.getTrace(), RegexMatcher.matchesRegex(
+ "0-Goaway-\\[1\\]-\\[11\\]-\\[Connection \\[\\d++\\], Stream \\[3\\], .*"));
+ } catch (SocketException se) {
+ // Expected on Windows
+ }
break;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org