Class RetryingTestExtension.FailedTestRetrier
java.lang.Object
org.junitpioneer.jupiter.RetryingTestExtension.FailedTestRetrier
- All Implemented Interfaces:
Iterator<RetryingTestInvocationContext>
- Enclosing class:
RetryingTestExtension
private static class RetryingTestExtension.FailedTestRetrier
extends Object
implements Iterator<RetryingTestInvocationContext>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final TestNameFormatterprivate final intprivate final intprivate intprivate final List<org.opentest4j.TestAbortedException> private booleanprivate booleanprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFailedTestRetrier(int maxRetries, int minSuccess, int suspendForMs, Class<? extends Throwable>[] expectedExceptions, TestNameFormatter formatter) -
Method Summary
Modifier and TypeMethodDescription(package private) static RetryingTestExtension.FailedTestRetrierprivate booleanexpectedException(Throwable exception) (package private) <E extends Throwable>
voidfailed(E exception) booleanhasNext()private booleannext()private voidsuspendFor(int millis) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
maxRetries
private final int maxRetries -
minSuccess
private final int minSuccess -
suspendForMs
private final int suspendForMs -
expectedExceptions
-
seenExceptions
-
formatter
-
retriesSoFar
private int retriesSoFar -
exceptionsSoFar
private int exceptionsSoFar -
seenFailedAssumption
private boolean seenFailedAssumption -
seenUnexpectedException
private boolean seenUnexpectedException
-
-
Constructor Details
-
FailedTestRetrier
private FailedTestRetrier(int maxRetries, int minSuccess, int suspendForMs, Class<? extends Throwable>[] expectedExceptions, TestNameFormatter formatter)
-
-
Method Details
-
createFor
static RetryingTestExtension.FailedTestRetrier createFor(Method test, org.junit.jupiter.api.extension.ExtensionContext context) -
failed
- Throws:
E
-
expectedException
-
suspendFor
private void suspendFor(int millis) -
isFirstExecution
private boolean isFirstExecution() -
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<RetryingTestInvocationContext>
-
next
- Specified by:
nextin interfaceIterator<RetryingTestInvocationContext>
-