On 07/07/2011 00:08, Konstantin Kolinko wrote:
> 2011/7/6  <ma...@apache.org>:
>> Author: markt
>> Date: Wed Jul  6 16:31:31 2011
>> New Revision: 1143488
>>
>> URL: http://svn.apache.org/viewvc?rev=1143488&view=rev
>> Log:
>> Refactor to avoid NPEs during test
>>
>> Modified:
>>    tomcat/trunk/test/org/apache/tomcat/util/threads/TestLimitLatch.java
>>
> 
>> @@ -120,6 +113,8 @@ public class TestLimitLatch extends Test
>>                 latch.countUpOrAwait();
>>                 Thread.sleep(holdTime);
>>                 latch.countDown();
>> +            } catch (NullPointerException npe) {
>> +                npe.printStackTrace();
> 
> If you are really avoiding the exception as the commit message says,
> then the above catch should not be necessary? It just suppresses it.

Grr. That was old test code (I had a break point set there) that snuck
in. I'll pull that out in a sec.

> The issue was with the testcase and not with the latch itself?

Yeah. The latch was being nulled out by the tearDown() code before the
test threads had completely finished.

Mark



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

Reply via email to