quick-perf / quickperf

QuickPerf is a testing library for Java to quickly evaluate and improve some performance-related properties
https://github.com/quick-perf/doc/wiki/QuickPerf
Apache License 2.0
466 stars 67 forks source link

Fix NPE in QuickPerfSpringRunner (JUnit 4) with Surefire #179

Closed jeanbisutti closed 2 years ago

jeanbisutti commented 2 years ago

This issue happened during the development of the folowing PR on the update of file headers (license).

The stack:

java.lang.NullPointerException
    at org.quickperf.spring.junit4.QuickPerfSpringRunner.setScheduler(QuickPerfSpringRunner.java:558)
    at org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder$PC.setSchedulers(ParallelComputerBuilder.java:608)
    at org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder$PC.setSchedulers(ParallelComputerBuilder.java:568)
    at org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder$PC.getSuite(ParallelComputerBuilder.java:367)
    at org.junit.runner.Request.classes(Request.java:75)
    at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:126)
    at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
    at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
    at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
    at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
    at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)