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 @@ -382,7 +382,7 @@ public void shouldPassAllOutcomes(
382
382
if (isLastAttempt ) {
383
383
throw e ;
384
384
}
385
-
385
+
386
386
ignoreRemaining .remove (testName );
387
387
abort ("Ignoring failure and retrying attempt " + attemptNumber );
388
388
}
Original file line number Diff line number Diff line change @@ -509,6 +509,12 @@ public TestApplicator when(final Supplier<Boolean> precondition) {
509
509
return this ;
510
510
}
511
511
512
+ /**
513
+ * The modification, if it is a RETRY, will only be applied when the
514
+ * failure message contains the provided message fragment. If an
515
+ * {@code AssertionFailedError} occurs, and has a cause, the cause's
516
+ * message will be checked. Otherwise, the throwable will be checked.
517
+ */
512
518
public TestApplicator whenFailureContains (final String messageFragment ) {
513
519
this .matchesThrowable = (final Throwable e ) -> {
514
520
// inspect the cause for failed assertions with a cause
@@ -546,11 +552,15 @@ public enum Modifier {
546
552
*/
547
553
SKIP ,
548
554
/**
549
- * Retry the test on failure.
555
+ * Ignore results and retry the test on failure. Will not repeat the
556
+ * test if the test succeeds. Multiple copies of the test are used to
557
+ * facilitate retries.
550
558
*/
551
559
RETRY ,
552
560
/**
553
- * Retry the test multiple times, without ignoring failures.
561
+ * The test will be retried multiple times, without the results being
562
+ * ignored. This is a helper that can be used, in patches, to check
563
+ * if certain tests are (still) flaky.
554
564
*/
555
565
FORCE_FLAKY ,
556
566
}
You can’t perform that action at this time.
0 commit comments