On 10/07/2011 10:28, Rainer Jung wrote:
> I get sporadic failures in TestCometProcessor for NIO. They are due to
> the Servlet reading two or more of the PING tokens during a single read
> event call. The loop
> 
>                 while (is.available() > 0) {
>                     is.read();
>                     count ++;
>                 }
> 
> then e.g. consumes PINGPING instead of PING and writes back "READ: 8 bytes".
> 
> Is this an error in the test case, e.g. if the chunks come in quickly
> enough is it OK, that they might get combined into a single read event?
> If so, we might want to add a little sleep in between sending the PING
> lines.

There is already a 1000ms sleep between sending the PINGs. That should
be enough to keep them separate.

Have you always seen these since that test was introduced or is this
something new?

As an aside, I have noticed that running the unit tests on a heavily
loaded box can trigger various timing related failures.

Mark

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

Reply via email to