tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1212105 - /tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
Date Thu, 08 Dec 2011 20:39:51 GMT
Author: markt
Date: Thu Dec  8 20:39:51 2011
New Revision: 1212105

URL: http://svn.apache.org/viewvc?rev=1212105&view=rev
Log:
Undo accidental commit of work-around. I'd prefer to keep trying to ID the root cause.

Modified:
    tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java

Modified: tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1212105&r1=1212104&r2=1212105&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java (original)
+++ tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Thu Dec  8 20:39:51
2011
@@ -166,7 +166,6 @@ public class TestCometProcessor extends 
         os.write(requestLine.getBytes());
         os.write("transfer-encoding: chunked\r\n".getBytes());
         os.write("\r\n".getBytes());
-        os.flush();
 
         PingWriterThread writeThread = new PingWriterThread(4, os);
         writeThread.start();
@@ -217,11 +216,10 @@ public class TestCometProcessor extends 
             // the 200 response code will already have been sent to the client
             if (SimpleCometServlet.FAIL_ON_BEGIN.equals(initParam)) {
                 assertEquals("HTTP/1.1 500 Internal Server Error", response[0]);
-                alv.validateAccessLog(1, 500, 0, 1100);
+                alv.validateAccessLog(1, 500, 0, 1000);
             } else {
                 assertEquals("HTTP/1.1 200 OK", response[0]);
-                // 0.1s pre-PINGS, 4s PINGS, 1s processing, 1s margin of error
-                alv.validateAccessLog(1, 200, 0, 6100);
+                alv.validateAccessLog(1, 200, 0, 5000);
             }
 
         }
@@ -392,9 +390,6 @@ public class TestCometProcessor extends 
         @Override
         public void run() {
             try {
-                // Sleep to overcome apparent JVM bug where Poller sometimes
-                // fails to report bytes available to read.
-                Thread.sleep(100);
                 for (int i = 0; i < pingCount; i++) {
                     os.write("4\r\n".getBytes());
                     os.write("PING\r\n".getBytes());



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


Mime
View raw message