Skip to content

Commit f093b41

Browse files
authored
Merge pull request #44152 from gsmet/avoid-npe-test
Do not throw NPE in AfterAll interceptor if application didn't start
2 parents 2245430 + 96b0c2f commit f093b41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusTestExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ public void interceptAfterEachMethod(Invocation<Void> invocation, ReflectiveInvo
886886
@Override
887887
public void interceptAfterAllMethod(Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext,
888888
ExtensionContext extensionContext) throws Throwable {
889-
if (isNativeOrIntegrationTest(extensionContext.getRequiredTestClass())) {
889+
if (runningQuarkusApplication == null || isNativeOrIntegrationTest(extensionContext.getRequiredTestClass())) {
890890
invocation.proceed();
891891
return;
892892
}

0 commit comments

Comments
 (0)