You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Cristian Vazzolla (JIRA)" <ji...@codehaus.org> on 2012/09/21 14:45:35 UTC

[jira] (SUREFIRE-912) A NPE is thrown when some test case fails in the ConcurrentReporterManager

Cristian Vazzolla created SUREFIRE-912:
------------------------------------------

             Summary: 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
         Attachments: ConcurrentReporterManager.patch, 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

        

[jira] (SUREFIRE-912) A NPE is thrown when some test case fails in the ConcurrentReporterManager

Posted by "Cristian Vazzolla (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309442#comment-309442 ] 

Cristian Vazzolla commented on SUREFIRE-912:
--------------------------------------------

Could the patch be applied and an internal/ intermediary release could be done so that we can use JUnit categories with Surefire ?
As for now we are blocked because of this issue.

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
>         Attachments: ConcurrentReporterManager.patch, 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

        

[jira] (SUREFIRE-912) A NPE is thrown when some test case fails in the ConcurrentReporterManager

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-912.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.13
         Assignee: Kristian Rosenvold

Fixed in  9c6abc2acf75e93f01596683a60c426810c7e7ee, thanks for the patch !

2.12.4 coming "soon"
                
> 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.13
>
>         Attachments: ConcurrentReporterManager.patch, 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

        

[jira] (SUREFIRE-912) A NPE is thrown when some test case fails in the ConcurrentReporterManager

Posted by "Mark Zalavari (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Zalavari updated SUREFIRE-912:
-----------------------------------

    Attachment: log_bug_surefire2.txt

We experience a very similar problem in 2.12.4. I attached the logs.
                
> 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

        

[jira] (SUREFIRE-912) A NPE is thrown when some test case fails in the ConcurrentReporterManager

Posted by "Cristian Vazzolla (JIRA)" <ji...@codehaus.org>.
    [ 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