File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
allure-junit4-aspect/src/main/java/io/qameta/allure/junit4 Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11package io .qameta .allure .junit4 ;
22
3- import org .aspectj .lang .annotation .AfterReturning ;
3+ import org .aspectj .lang .JoinPoint ;
4+ import org .aspectj .lang .annotation .After ;
45import org .aspectj .lang .annotation .Aspect ;
56import org .junit .runner .notification .RunNotifier ;
67
@@ -12,8 +13,9 @@ public class AllureJunit4ListenerAspect {
1213
1314 private final AllureJunit4 allure = new AllureJunit4 ();
1415
15- @ AfterReturning (pointcut = "call(org.junit.runner.notification.RunNotifier.new(..))" , returning = "notifier" )
16- public void addListener (final RunNotifier notifier ) {
16+ @ After ("execution(org.junit.runner.notification.RunNotifier.new())" )
17+ public void addListener (final JoinPoint point ) {
18+ final RunNotifier notifier = (RunNotifier ) point .getThis ();
1719 notifier .removeListener (allure );
1820 notifier .addListener (allure );
1921 }
You can’t perform that action at this time.
0 commit comments