[ 
https://jira.codehaus.org/browse/SUREFIRE-1114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tibor Digana closed SUREFIRE-1114.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.19

commit  dcc84fe8a65bf4380e72f765e92a824f7e74f10d

> NPE in TestSetStats. Concurrency issue with parallel methods on TestNG.
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-1114
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1114
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.18
>            Reporter: Tibor Digana
>            Assignee: Tibor Digana
>             Fix For: 2.19
>
>         Attachments: 
> org.apache.maven.surefire.its.CheckTestNgGroupThreadParallelIT.txt
>
>
> This issue was fond after running IT tests "CheckTestNgGroupThreadParallelIT" 
> of Maven Surefire Project.
> The CPU was fully overloaded which was maybe precondition in this issue.
> The problem is that the TestNG runs test methods in parallel and the 
> TestSetRunListener crashes.
> The field "reportEntries" in the class "TestSetStats" referenced ArrayList. 
> This collection is not thread-safe which means that the retrieval of the 
> elements is not guaranteed.
> The elements are added in TestSetStats#finishTest(). The elements are never 
> null, see the TestSetRunListener#testSucceeded() which passed a newly created 
> instance of WrappedReportEntry from wrap().
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.maven.plugin.surefire.report.TestSetStats.getTestResults(TestSetStats.java:229)
>       at 
> org.apache.maven.plugin.surefire.report.TestSetRunListener.testSetCompleted(TestSetRunListener.java:130)
>       at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.finishTestSuite(TestNGDirectoryTestSuite.java:306)



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to