[
https://jira.codehaus.org/browse/SUREFIRE-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311396#comment-311396
]
Cristian Vazzolla commented on SUREFIRE-912:
--------------------------------------------
Hi Mark,
After a first look at the code it seems that the getTestSet can also return
null, which is not checked for null in the testStarting method. But for the
root cause a more in depth investigation should be done. Maybe it would help if
you could provide a step by step scenario for reproducing this issue; I could
take a more in depth look at this issue if you can provide the scenario as I
had a look at the code a few weeks ago, if it is ok with Kristian R..
Regarding our own use of Maven Surefire I haven't had any issue (no NPE) after
the fix was applied but I haven't used the 2.12.4 release yet, I have been
using just an internal release and I intended to move to 2.12.4 just these days.
Regards,
Cristian
> A NPE is thrown when some test case fails in the ConcurrentReporterManager
> --------------------------------------------------------------------------
>
> Key: SUREFIRE-912
> URL: https://jira.codehaus.org/browse/SUREFIRE-912
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.7+ (parallel) support
> Environment: Windows 7
> Reporter: Cristian Vazzolla
> Assignee: Kristian Rosenvold
> Fix For: 2.12.4
>
> Attachments: ConcurrentReporterManager.patch, log_bug_surefire2.txt,
> log_bug_surefire.txt
>
>
> When using JUnit categories for testing some of the tests that fail will
> result in a NULL pointer exception being thrown from the
> ConcurrentReporterManager class and this breaks the surefire plugin execution
> so the tests that follow this will not get executed anymore.
> The root cause of the problem is that in the testFailed method the
> getOrCreateTestMethod method is called which on one of the flows returns null
> which is not treated in the testFailed method and gives a null pointer
> exception.
> I've created a patch for this issue in which I've modified the testFailed and
> the testAssumptionFailure methods to treat nicely the case when null is
> returned from getOrCreateTestMethod.
> I've also attached the log file with the exception.
> I have not included any test because this issue happens randomly not on a
> particular test case.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira