Author: markt Date: Mon Oct 19 15:44:17 2015 New Revision: 1709432 URL: http://svn.apache.org/viewvc?rev=1709432&view=rev Log: Expand the margin of error for Gump
Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_5_3.java Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_5_3.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_5_3.java?rev=1709432&r1=1709431&r2=1709432&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_5_3.java (original) +++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_5_3.java Mon Oct 19 15:44:17 2015 @@ -163,7 +163,7 @@ public class TestHttp2Section_5_3 extend // Unexpected stream Assert.fail("Unexpected stream: [" + output.getTrace() + "]"); } - if (data[1] > 3) { + if (data[1] > 10) { // Larger than expected body size Assert.fail("Larger than expected body: [" + output.getTrace() + "]"); } @@ -177,7 +177,7 @@ public class TestHttp2Section_5_3 extend // possible that the timing of the server threads is such that there are // still small body frames to read. int[] data = parseBodyFrame(output.getTrace()); - while (data[1] < 4) { + while (data[1] < 10) { // Debugging Gump failure log.info(output.getTrace()); output.clearTrace(); @@ -193,12 +193,16 @@ public class TestHttp2Section_5_3 extend log.info(output.getTrace()); if (data[0] == 19) { seen19 = true; - if (data[1] < 256 || data[1] > 260) { + // If everything works instantly this should be 256 but allow a + // fairly large margin for timing differences + if (data[1] < 256 || data[1] > 290) { Assert.fail("Unexpected body size: [" + output.getTrace() + "]"); } } else if (data[0] == 21) { seen21 = true; - if (data[1] < 768 || data[1] > 772) { + // If everything works instantly this should be 768 but allow a + // fairly large margin for timing differences + if (data[1] < 768 || data[1] > 800) { Assert.fail("Unexpected body size: [" + output.getTrace() + "]"); } } else { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org