You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Anders Wallgren (Jira)" <ji...@apache.org> on 2020/04/11 01:44:00 UTC

[jira] [Commented] (SUREFIRE-1759) NullPointerException from RunEntryStatisticsMap#serialize when there's a class-level @Ignore annotation

    [ https://issues.apache.org/jira/browse/SUREFIRE-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081092#comment-17081092 ] 

Anders Wallgren commented on SUREFIRE-1759:
-------------------------------------------

OK, I finally had time to track this down and create a test for it – it's not related to use of the Ignore annotation – instead it seems to be triggered by using runOrder=failedfirst.

See [https://github.com/awallgren/maven-surefire/tree/SUREFIRE-1759] for a test. 

 

> NullPointerException from RunEntryStatisticsMap#serialize when there's a class-level @Ignore annotation
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1759
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1759
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M4
>            Reporter: Anders Wallgren
>            Priority: Major
>             Fix For: 3.0.0-M5
>
>
> When a class with a class-level @Ignore annotation is run, the output looks like this:
> {quote}1,0,com.electriccloud.commander.agent.config.AgentConfigurationIT,
> {quote}
> {{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}}}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)