Skip to content

Commit 883417c

Browse files
committed
ModuleErroredEventTest: do not dump stack trace
It's confusing to see the "Yay!" stack trace in the test output. We can consume the event to prevent it from being emitted, while still testing that the exception is reported via the EventService.
1 parent f7b78a8 commit 883417c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/test/java/org/scijava/module/event/ModuleErroredEventTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public void testModuleErroredEvent() {
7575
@EventHandler
7676
void onEvent(final ModuleErroredEvent e) {
7777
caughtException[0] = e.getException();
78+
e.consume(); // Prevent exception from being emitted to stderr.
7879
}
7980
};
8081
es.subscribe(interestedParty);

0 commit comments

Comments
 (0)