Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-912

A NPE is thrown when some test case fails in the ConcurrentReporterManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.12.4
    • None
    • Windows 7
    • Patch

    Description

      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.

      Attachments

        1. ConcurrentReporterManager.patch
          1 kB
          Cristian Vazzolla
        2. log_bug_surefire.txt
          3 kB
          Cristian Vazzolla
        3. log_bug_surefire2.txt
          3 kB
          Mark Zalavari

        Activity

          People

            krosenvold Kristian Rosenvold
            vazzolla Cristian Vazzolla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: