[infinispan-dev] Hanging testsuite / bug in TestNG?

Manik Surtani manik at jboss.org
Wed Jun 27 10:51:17 EDT 2012


Awesome, thanks Adrian.

It may make sense to speak to some of the Maven folks to get this accepted and in a release form asap so we can use it.  


On 27 Jun 2012, at 12:51, Adrian Nistor wrote:

> I've just submitted the surefire ConcurrentModificationException issue 
> (http://jira.codehaus.org/browse/SUREFIRE-879) and also created a pull 
> request for the (trivial) fix. Let's hope they will be quick to handle 
> it. This has the potential of eliminating many of our random test failures.
> 
> On 06/26/2012 11:59 PM, Adrian Nistor wrote:
>> The entire System.out and System.err is redirected. I don't want to
>> think what this means in the context of concurrent test execution...
>> 
>> On 06/26/2012 11:32 PM, Sanne Grinovero wrote:
>>> Thanks Adrian,
>>> Is the log4j console appender being redirected by surefire?
>>> 
>>> On 26 June 2012 21:21, Adrian Nistor <anistor at redhat.com> wrote:
>>>> Hi Sanne,
>>>> 
>>>> I know the explanation was a bit laconic so I'll try to expand it a bit.
>>>> surefire has a buffer (a List actually) were console output is
>>>> accumulated during each test.
>>>> The list is synchronized so multiple threads writing to console is not
>>>> causing List corruption.
>>>> There is a very sensitive moment though at the end of the test when this
>>>> List of text lines is consolidated into a StringBuffer that is added to
>>>> the test report. Unfortunately during consolidation the List is accessed
>>>> without proper synchronization and if some stray thread outlives the
>>>> test and continues to generate output or we run multiple tests
>>>> concurrently - this will most likely cause a
>>>> ConcurrentModificationException.  Of course this problem is avoided if
>>>> you disable logging to console :). Actually not entirely avoided, but
>>>> minimized, because some tests also write to console directly using
>>>> System.out.println() and that can still trigger the issue.
>>>> 
>>>> Adrian
>>>> 
>>>> On 06/26/2012 07:33 PM, Sanne Grinovero wrote:
>>>>> On 26 June 2012 16:55, Adrian Nistor <anistor at redhat.com> wrote:
>>>>>> It doesn't know or care about it. But by disabling log4j console appender
>>>>>> you minimize the amount of text written to console and the risk to trigger
>>>>>> the surefire-report bug.
>>>>> because it returns quicker?
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> infinispan-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani

Project Lead, Infinispan
http://www.infinispan.org

Platform Architect, JBoss Data Grid
http://www.redhat.com/promo/dg6beta

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20120627/4ca3538f/attachment-0001.html 


More information about the infinispan-dev mailing list