You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/08/28 10:03:23 UTC

svn commit: r1621087 - /tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

Author: markt
Date: Thu Aug 28 08:03:23 2014
New Revision: 1621087

URL: http://svn.apache.org/r1621087
Log:
Increase size of response that is written and reduce data read before
client drops the connection in an attempt to get this test passing with
APR in Gump. Currently the entire reponse is written (and buffered
somewhere in the network stack) before the client drops the connection.

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=1621087&r1=1621086&r2=1621087&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (original)
+++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Thu Aug 28 08:03:23 2014
@@ -59,7 +59,7 @@ public class TestNonBlockingAPI extends 
     private static final Log log = LogFactory.getLog(TestNonBlockingAPI.class);
 
     private static final int CHUNK_SIZE = 1024 * 1024;
-    private static final int WRITE_SIZE  = CHUNK_SIZE * 5;
+    private static final int WRITE_SIZE  = CHUNK_SIZE * 10;
     private static final byte[] DATA = new byte[WRITE_SIZE];
     private static final int WRITE_PAUSE_MS = 500;
 
@@ -302,7 +302,7 @@ public class TestNonBlockingAPI extends 
         int read = 0;
         int readSinceLastPause = 0;
         int readTotal = 0;
-        while (read != -1 && readTotal < WRITE_SIZE / 8) {
+        while (read != -1 && readTotal < WRITE_SIZE / 32) {
             long start = System.currentTimeMillis();
             read = is.read(buffer);
             long end = System.currentTimeMillis();
@@ -313,7 +313,7 @@ public class TestNonBlockingAPI extends 
             }
             readSinceLastPause += read;
             readTotal += read;
-            if (readSinceLastPause > WRITE_SIZE / 16) {
+            if (readSinceLastPause > WRITE_SIZE / 64) {
                 readSinceLastPause = 0;
                 Thread.sleep(WRITE_PAUSE_MS);
             }



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


Re: svn commit: r1621087 - /tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

Posted by Mark Thomas <ma...@apache.org>.
On 28/08/2014 09:03, markt@apache.org wrote:
> Author: markt
> Date: Thu Aug 28 08:03:23 2014
> New Revision: 1621087
> 
> URL: http://svn.apache.org/r1621087
> Log:
> Increase size of response that is written and reduce data read before
> client drops the connection in an attempt to get this test passing with
> APR in Gump. Currently the entire reponse is written (and buffered
> somewhere in the network stack) before the client drops the connection.

This appears to have done the trick. Gump tests are passing again.

Mark

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