Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not throw NPE in AfterAll interceptor if application didn't start
This is to solve an issue that we can see from time to time in the CI: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.app.RunningQuarkusApplication.getClassLoader()" because "io.quarkus.test.junit.QuarkusTestExtension.runningQuarkusApplication" is null at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:909) at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:901) at io.quarkus.test.junit.QuarkusTestExtension.interceptAfterAllMethod(QuarkusTestExtension.java:895) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) Suppressed: org.opentest4j.TestAbortedException: Boot failed For instance here: #43448 (comment) in the io.quarkus.it.mongodb.BookResourceTest failure. (cherry picked from commit 96b0c2f)
- Loading branch information