Skip to content

Commit

Permalink
fix junit 4 aspect (fixes #975, via #1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
baev authored Mar 1, 2024
1 parent 6a1fd52 commit 1c69799
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public class AllureJunit4ListenerAspect {
@After("execution(org.junit.runner.notification.RunNotifier.new())")
public void addListener(final JoinPoint point) {
final RunNotifier notifier = (RunNotifier) point.getThis();
notifier.removeListener(allure);
notifier.addListener(allure);
if (RunNotifier.class.equals(notifier.getClass())) {
notifier.addListener(allure);
}
}

}

0 comments on commit 1c69799

Please sign in to comment.