Author: markt
Date: Mon Feb 5 10:52:35 2018
New Revision: 1823150
URL: http://svn.apache.org/viewvc?rev=1823150&view=rev
Log:
Make test more robust after feedback on users list
https://lists.apache.org/thread.html/988da7f61784405143bb2a3c4c73c148e7002fafaa4385b97c831acc@%3Cusers.tomcat.apache.org%3E
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=1823150&r1=1823149&r2=1823150&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java Mon Feb 5
10:52:35 2018
@@ -17,7 +17,6 @@
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;
@@ -253,13 +252,16 @@ public class TestHttp2Limits extends Htt
// Connection reset. Connection ID will vary so use a pattern
// On some platform / Connector combinations (e.g. Windows / APR),
// the TCP connection close will be processed before the client
gets
- // a chance to read the connection close frame
+ // a chance to read the connection close frame which will trigger
an
+ // IOException when we try to read the frame.
+ // Note: Some platforms will allow the read if if the write fails
+ // above.
try {
parser.readFrame(true);
Assert.assertThat(output.getTrace(), RegexMatcher.matchesRegex(
"0-Goaway-\\[1\\]-\\[11\\]-\\[Connection \\[\\d++\\],
Stream \\[3\\], .*"));
- } catch (SocketException se) {
- // Expected on Windows
+ } catch (IOException se) {
+ // Expected on some platforms
}
break;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]