diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/AbstractTestWithCallbacksExtension.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/AbstractTestWithCallbacksExtension.java index f9b6d75c5c72d..2717fe0fa4a40 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/AbstractTestWithCallbacksExtension.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/AbstractTestWithCallbacksExtension.java @@ -80,14 +80,18 @@ protected void invokeAfterEachCallbacks(QuarkusTestMethodContext testMethodConte invokeAfterEachCallbacks(QuarkusTestMethodContext.class, testMethodContext); } - protected boolean isAfterAllCallbacksEmpty() { - return afterAllCallbacks == null || afterAllCallbacks.isEmpty(); + protected boolean isAfterEachCallbacksEmpty() { + return afterEachCallbacks == null || afterEachCallbacks.isEmpty(); } protected void invokeAfterEachCallbacks(Class clazz, Object classInstance) throws Exception { invokeCallbacks(afterEachCallbacks, "afterEach", clazz, classInstance); } + protected boolean isAfterAllCallbacksEmpty() { + return afterAllCallbacks == null || afterAllCallbacks.isEmpty(); + } + protected void invokeAfterAllCallbacks(QuarkusTestContext testContext) throws Exception { invokeAfterAllCallbacks(QuarkusTestContext.class, testContext); } diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java index eae6f1471528a..a9e7a071ddc6d 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java @@ -82,7 +82,7 @@ public void afterTestExecution(ExtensionContext context) throws Exception { @Override public void afterEach(ExtensionContext context) throws Exception { if (!failedBoot) { - if (!isAfterAllCallbacksEmpty()) { + if (!isAfterEachCallbacksEmpty()) { invokeAfterEachCallbacks(createQuarkusTestMethodContext(context)); }