Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 14CE662DB for ; Sun, 10 Jul 2011 10:13:38 +0000 (UTC) Received: (qmail 9975 invoked by uid 500); 10 Jul 2011 10:13:35 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 9619 invoked by uid 500); 10 Jul 2011 10:13:29 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 9608 invoked by uid 99); 10 Jul 2011 10:13:26 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2011 10:13:26 +0000 Received: from localhost (HELO s2laptop.local) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2011 10:13:26 +0000 Message-ID: <4E197B44.3060200@apache.org> Date: Sun, 10 Jul 2011 11:13:24 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: Sporadic failures in TestCometProcessor References: <4E1970B1.9050201@kippdata.de> In-Reply-To: <4E1970B1.9050201@kippdata.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org