Author: markt
Date: Thu Oct 20 12:22:10 2016
New Revision: 1765813
URL: http://svn.apache.org/viewvc?rev=1765813&view=rev
Log:
Handle timing differences
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=1765813&r1=1765812&r2=1765813&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Limits.java Thu Oct 20
12:22:10 2016
@@ -241,8 +241,15 @@ public class TestHttp2Limits extends Htt
break;
}
case 2: {
- // Expect an IOException caused by a connection reset
- Assert.assertNotNull(e);
+ // Behaviour depends on timing. If reset is processed fast enough,
+ // frames will be swallowed before the connection reset limit is
+ // reached
+ if (e == null) {
+ parser.readFrame(true);
+ Assert.assertEquals("3-RST-[11]\n", output.getTrace());
+ Assert.assertNull(e);
+ }
+ // Else is non-null as expected for a connection reset
break;
}
default: {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]