Skip to content

Commit

Permalink
Document that TestExecutionListeners cannot fail test execution
Browse files Browse the repository at this point in the history
Resolves #3591.

(cherry picked from commit 3fac3e9)
  • Loading branch information
marcphilipp committed Jun 17, 2024
1 parent d8abde5 commit b1b2c24
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static org.apiguardian.api.API.Status.STABLE;

import org.apiguardian.api.API;
import org.junit.platform.commons.util.UnrecoverableExceptions;
import org.junit.platform.engine.TestExecutionResult;
import org.junit.platform.engine.TestExecutionResult.Status;
import org.junit.platform.engine.reporting.ReportEntry;
Expand All @@ -30,6 +31,12 @@
* events are called in reverse order. Test case execution won't start before
* all {@link #executionStarted(TestIdentifier)} calls have returned.
*
* <p>If an exception is thrown by an implementation of a method of this
* interface, the exception will be caught and logged unless it is deemed
* {@linkplain UnrecoverableExceptions unrecoverable}. In consequence, a
* {@code TestExecutionListener} cannot cause test execution to fail or abort it
* early by throwing an exception.
*
* <p>JUnit provides two example implementations.
*
* <ul>
Expand Down

0 comments on commit b1b2c24

Please sign in to comment.