Author: remm
Date: Wed Aug 13 14:06:43 2014
New Revision: 1617734

URL: http://svn.apache.org/r1617734
Log:
NIO2 seems less likely to detect a disconnect when writing, for some reason. 
When the test fails (extremely rare for me), no error is actually reported by 
NIO2 so there's nothing that can really be improved from what I can see. Try to 
disconnect earlier to try to improve the test's reliability on gump (this also 
makes the test run faster).

Modified:
    tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

Modified: 
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1617734&r1=1617733&r2=1617734&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
Wed Aug 13 14:06:43 2014
@@ -302,7 +302,7 @@ public class TestNonBlockingAPI extends 
         int read = 0;
         int readSinceLastPause = 0;
         int readTotal = 0;
-        while (read != -1 && readTotal < WRITE_SIZE / 2) {
+        while (read != -1 && readTotal < WRITE_SIZE / 8) {
             long start = System.currentTimeMillis();
             read = is.read(buffer);
             long end = System.currentTimeMillis();
@@ -349,8 +349,8 @@ public class TestNonBlockingAPI extends 
 
         // TODO Figure out why non-blocking writes with the NIO connector 
appear
         // to be slower on Linux
-        alv.validateAccessLog(1, 500, WRITE_PAUSE_MS * 7,
-                WRITE_PAUSE_MS * 7 + 30 * 1000);
+        alv.validateAccessLog(1, 500, WRITE_PAUSE_MS,
+                WRITE_PAUSE_MS + 30 * 1000);
     }
 
 



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

Reply via email to