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

NullPointerException from RunEntryStatisticsMap#serialize when there's a class-level @Ignore annotation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M4
    • 3.0.0-M5
    • None
    • None

    Description

      When a class with a class-level @Ignore annotation is run, the output looks like this:

      1,0,com.electriccloud.commander.agent.config.AgentConfigurationIT,

      This causes a NullPointerException when running in forked mode:

       

      {{[ERROR] Caused by: java.lang.NullPointerException}}
      {{ [ERROR] at java.base/java.io.StringReader.<init>(StringReader.java:50)}}
      {{ [ERROR] at java.base/java.util.Scanner.<init>(Scanner.java:766)}}
      {{ [ERROR] at org.apache.maven.plugin.surefire.runorder.RunEntryStatisticsMap.serialize(RunEntryStatisticsMap.java:160)}}
      {{ [ERROR] at org.apache.maven.plugin.surefire.runorder.StatisticsReporter.testSetCompleted(StatisticsReporter.java:56)}}
      {{ [ERROR] at org.apache.maven.plugin.surefire.report.TestSetRunListener.testSetCompleted(TestSetRunListener.java:194)}}
      {{ [ERROR] at org.apache.maven.surefire.junitcore.NonConcurrentRunListener.testRunFinished(NonConcurrentRunListener.java:176)}}
      {{ [ERROR] at org.junit.runner.notification.SynchronizedRunListener.testRunFinished(SynchronizedRunListener.java:42)}}
      {{ [ERROR] at org.junit.runner.notification.RunNotifier$2.notifyListener(RunNotifier.java:103)}}
      {{ [ERROR] at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)}}
      {{ [ERROR] at org.junit.runner.notification.RunNotifier.fireTestRunFinished(RunNotifier.java:100)}}
      {{ [ERROR] at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:63)}}
      {{ [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)}}
      {{ [ERROR] ... 37 more}}

      Attachments

        Activity

          People

            tibordigana Tibor Digana
            awallgren Anders Wallgren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: