Author: markt
Date: Thu Feb 25 20:57:02 2016
New Revision: 1732367

URL: http://svn.apache.org/viewvc?rev=1732367&view=rev
Log:
Pull our timing margin as a constant and use the relaxTiming option

Modified:
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_8.java

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_8.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_8.java?rev=1732367&r1=1732366&r2=1732367&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_8.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_8.java Thu Feb 
25 20:57:02 2016
@@ -30,7 +30,11 @@ import org.apache.catalina.connector.Con
  */
 public class TestHttp2Section_6_8 extends Http2TestBase {
 
+    private static final boolean RELAX_TIMING = 
Boolean.getBoolean("tomcat.test.relaxTiming");
+
     private static final long PNG_ACK_DELAY_MS = 2000;
+    // On slow systems (Gump) may need to be higher
+    private static final long TIMING_MARGIN_MS = RELAX_TIMING ? 1000 : 200;
 
     @Test
     public void testGoawayIgnoreNewStreams() throws Exception {
@@ -51,7 +55,7 @@ public class TestHttp2Section_6_8 extend
         sendClientPreface();
         validateHttp2InitialResponse();
 
-        Thread.sleep(PNG_ACK_DELAY_MS + 500);
+        Thread.sleep(PNG_ACK_DELAY_MS + TIMING_MARGIN_MS);
 
         getTomcatInstance().getConnector().pause();
 
@@ -65,7 +69,7 @@ public class TestHttp2Section_6_8 extend
         // Should be processed
         sendSimpleGetRequest(3);
 
-        Thread.sleep(PNG_ACK_DELAY_MS + 500);
+        Thread.sleep(PNG_ACK_DELAY_MS + TIMING_MARGIN_MS);
 
         // Should be ignored
         sendSimpleGetRequest(5);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to