Skip to content

Commit 1c69799

Browse files
authored
fix junit 4 aspect (fixes #975, via #1014)
1 parent 6a1fd52 commit 1c69799

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

allure-junit4-aspect/src/main/java/io/qameta/allure/junit4/aspect/AllureJunit4ListenerAspect.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public class AllureJunit4ListenerAspect {
3232
@After("execution(org.junit.runner.notification.RunNotifier.new())")
3333
public void addListener(final JoinPoint point) {
3434
final RunNotifier notifier = (RunNotifier) point.getThis();
35-
notifier.removeListener(allure);
36-
notifier.addListener(allure);
35+
if (RunNotifier.class.equals(notifier.getClass())) {
36+
notifier.addListener(allure);
37+
}
3738
}
38-
3939
}

0 commit comments

Comments
 (0)