diff --git a/junit5/core/src/main/java/org/jboss/arquillian/junit5/ArquillianExtension.java b/junit5/core/src/main/java/org/jboss/arquillian/junit5/ArquillianExtension.java index bf6240991..13a7c21c5 100644 --- a/junit5/core/src/main/java/org/jboss/arquillian/junit5/ArquillianExtension.java +++ b/junit5/core/src/main/java/org/jboss/arquillian/junit5/ArquillianExtension.java @@ -96,7 +96,10 @@ public void interceptTestMethod(Invocation invocation, ReflectiveInvocatio public void interceptBeforeEachMethod(Invocation invocation, ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { if (IS_INSIDE_ARQUILLIAN.test(extensionContext) || isRunAsClient(extensionContext)) { - invocation.proceed(); + getManager(extensionContext).getAdaptor().before( + extensionContext.getRequiredTestInstance(), + extensionContext.getRequiredTestMethod(), + invocation::proceed); } else { invocation.skip(); } @@ -106,7 +109,10 @@ public void interceptBeforeEachMethod(Invocation invocation, public void interceptAfterEachMethod(Invocation invocation, ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { if (IS_INSIDE_ARQUILLIAN.test(extensionContext) || isRunAsClient(extensionContext)) { - invocation.proceed(); + getManager(extensionContext).getAdaptor().after( + extensionContext.getRequiredTestInstance(), + extensionContext.getRequiredTestMethod(), + invocation::proceed); } else { invocation.skip(); }