Mark,

On 10/23/14 3:48 PM, ma...@apache.org wrote:
> Author: markt
> Date: Thu Oct 23 19:48:08 2014
> New Revision: 1633936
> 
> URL: http://svn.apache.org/r1633936
> Log:
> Fix some intermittent test failures with NIO2 on OSX (problems with the test, 
> not the code)
> 
> Modified:
>     tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
> 
> Modified: 
> tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1633936&r1=1633935&r2=1633936&view=diff
> ==============================================================================
> --- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java 
> (original)
> +++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java 
> Thu Oct 23 19:48:08 2014
> @@ -360,7 +360,13 @@ public class TestCoyoteAdapter extends T
>                  public void run() {
>                      for (int i = 0; i < 20; i++) {
>                          try {
> -                            os.write(BYTES_8K);
> +                            // Some tests depend on this write failing (e.g.
> +                            // because the client has gone away). In some 
> cases
> +                            // there may be a large (ish) buffer to fill 
> before
> +                            // the write fails.
> +                            for (int j = 0 ; j < 8; i++) {
> +                                os.write(BYTES_8K);
> +                            }

I'm fairly sure you want j++ here instead of i++, otherwise your tests
are going to take a very long time to complete.

-chris

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to