Author: markt
Date: Sun Feb  3 11:46:39 2013
New Revision: 1441899

URL: http://svn.apache.org/viewvc?rev=1441899&view=rev
Log:
Make the test more robust. The socket may get closed before the client has a 
chance to send all the data.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    
tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1441895

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java?rev=1441899&r1=1441898&r2=1441899&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java 
Sun Feb  3 11:46:39 2013
@@ -344,8 +344,12 @@ public class TestInternalInputBuffer ext
 
         NewLinesClient client = new NewLinesClient(10000);
 
-        client.doRequest();
-        assertTrue(client.isResponse400());
+        // If the connection is closed fast enough, writing the request will
+        // fail and the response won't be read.
+        Exception e = client.doRequest();
+        if (e == null) {
+            assertTrue(client.isResponse400());
+        }
         assertFalse(client.isResponseBodyOK());
     }
 



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

Reply via email to