Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
katcharov committed Dec 5, 2024
1 parent 3b2c915 commit ce1918c
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,12 @@ public TestApplicator when(final Supplier<Boolean> precondition) {
return this;
}

/**
* The modification, if it is a RETRY, will only be applied when the
* failure message contains the provided message fragment. If an
* {@code AssertionFailedError} occurs, and has a cause, the cause's
* message will be checked. Otherwise, the throwable will be checked.
*/
public TestApplicator whenFailureContains(final String messageFragment) {
this.matchesThrowable = (final Throwable e) -> {
// inspect the cause for failed assertions with a cause
Expand Down Expand Up @@ -546,11 +552,15 @@ public enum Modifier {
*/
SKIP,
/**
* Retry the test on failure.
* Ignore results and retry the test on failure. Will not repeat the
* test if the test succeeds. Multiple copies of the test are used to
* facilitate retries.
*/
RETRY,
/**
* Retry the test multiple times, without ignoring failures.
* The test will be retried multiple times, without the results being
* ignored. This is a helper that can be used, in patches, to check
* if certain tests are (still) flaky.
*/
FORCE_FLAKY,
}
Expand Down

0 comments on commit ce1918c

Please sign in to comment.