File tree 2 files changed +13
-3
lines changed
driver-sync/src/test/functional/com/mongodb/client/unified 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ public void shouldPassAllOutcomes(
389
389
if (isLastAttempt ) {
390
390
throw e ;
391
391
}
392
-
392
+
393
393
ignoreRemaining .remove (testName );
394
394
abort ("Ignoring failure and retrying attempt " + attemptNumber );
395
395
}
Original file line number Diff line number Diff line change @@ -489,6 +489,12 @@ public TestApplicator when(final Supplier<Boolean> precondition) {
489
489
return this ;
490
490
}
491
491
492
+ /**
493
+ * The modification, if it is a RETRY, will only be applied when the
494
+ * failure message contains the provided message fragment. If an
495
+ * {@code AssertionFailedError} occurs, and has a cause, the cause's
496
+ * message will be checked. Otherwise, the throwable will be checked.
497
+ */
492
498
public TestApplicator whenFailureContains (final String messageFragment ) {
493
499
this .matchesThrowable = (final Throwable e ) -> {
494
500
// inspect the cause for failed assertions with a cause
@@ -526,11 +532,15 @@ public enum Modifier {
526
532
*/
527
533
SKIP ,
528
534
/**
529
- * Retry the test on failure.
535
+ * Ignore results and retry the test on failure. Will not repeat the
536
+ * test if the test succeeds. Multiple copies of the test are used to
537
+ * facilitate retries.
530
538
*/
531
539
RETRY ,
532
540
/**
533
- * Retry the test multiple times, without ignoring failures.
541
+ * The test will be retried multiple times, without the results being
542
+ * ignored. This is a helper that can be used, in patches, to check
543
+ * if certain tests are (still) flaky.
534
544
*/
535
545
FORCE_FLAKY ,
536
546
}
You can’t perform that action at this time.
0 commit comments