maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Digana (JIRA)" <>
Subject [jira] (SUREFIRE-1114) NPE in TestSetStats. Concurrency issue with parallel methods on TestNG.
Date Fri, 07 Nov 2014 20:30:10 GMT


Tibor Digana updated SUREFIRE-1114:

    Attachment: org.apache.maven.surefire.its.CheckTestNgGroupThreadParallelIT.txt

This issue was fond after running IT tests "CheckTestNgGroupThreadParallelIT" of Maven Surefire
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.surefire.testng.TestNGDirectoryTestSuite.finishTestSuite(

> NPE in TestSetStats. Concurrency issue with parallel methods on TestNG.
> -----------------------------------------------------------------------
>                 Key: SUREFIRE-1114
>                 URL:
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.18
>            Reporter: Tibor Digana
>            Assignee: Tibor Digana
>         Attachments: org.apache.maven.surefire.its.CheckTestNgGroupThreadParallelIT.txt

This message was sent by Atlassian JIRA

View raw message