public static interface FlakyTestRunner.Builder<X extends Throwable>
| Modifier and Type | Method and Description |
|---|---|
FlakyTestRunner.RunnableThrows<X> |
build()
Creates a Runnable that runs the provided runnable according to the
Builder's parameters.
|
FlakyTestRunner.Builder<X> |
withErrorLogger(Consumer<? super String> errorLogger)
Sets the error logger to use for messages.
|
FlakyTestRunner.Builder<X> |
withFlakyOnThisArchitecture(boolean flakyOnThisArchitecture)
Sets if the runner is flaky on this architecture.
|
FlakyTestRunner.Builder<X> |
withInfoLogger(Consumer<? super String> infoLogger)
Sets the info logger to use for messages.
|
FlakyTestRunner.Builder<X> |
withInterIterationGc(boolean interIterationGc)
Sets if a garbage collect should be requested between each iterations.
|
FlakyTestRunner.Builder<X> |
withIterationDelay(long delayMs)
Sets the delay between each iteration in ms.
|
FlakyTestRunner.Builder<X> |
withMaxIterations(int maxIterations)
Sets the maximum number of iteration before the runner fails.
|
FlakyTestRunner.Builder<X> withFlakyOnThisArchitecture(boolean flakyOnThisArchitecture)
Default value: true
flakyOnThisArchitecture - to useFlakyTestRunner.Builder<X> withMaxIterations(int maxIterations)
Default value: 2
maxIterations - non-negative value to useFlakyTestRunner.Builder<X> withIterationDelay(long delayMs)
Default value: 500 ms
delayMs - non-negative value to useFlakyTestRunner.Builder<X> withInterIterationGc(boolean interIterationGc)
Default value: true
interIterationGc - to useFlakyTestRunner.Builder<X> withInfoLogger(Consumer<? super String> infoLogger)
Default value: System.out::println
infoLogger - to useFlakyTestRunner.Builder<X> withErrorLogger(Consumer<? super String> errorLogger)
Default value: System.err::println
errorLogger - to useFlakyTestRunner.RunnableThrows<X> build()
This method can only be invoked once.
Copyright © 2023. All rights reserved.