Author: markt Date: Sun Feb 3 11:46:09 2013 New Revision: 1441895 URL: http://svn.apache.org/viewvc?rev=1441895&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/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java Modified: tomcat/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java?rev=1441895&r1=1441894&r2=1441895&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java (original) +++ tomcat/trunk/test/org/apache/coyote/http11/TestInternalInputBuffer.java Sun Feb 3 11:46:09 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