public final class FlakyTestRunner extends Object
This class is part of a builder pattern allowing users to define how flaky tests should be handled, enabling them to configure and adapt the behavior as needed.
| Modifier and Type | Class and Description |
|---|---|
static interface |
FlakyTestRunner.Builder<X extends Throwable>
Defines the interface for constructing and configuring a flaky test runner.
|
static interface |
FlakyTestRunner.RunnableThrows<T extends Throwable>
A functional interface representing a runnable action that might throw a specific exception.
|
| Modifier and Type | Method and Description |
|---|---|
static <X extends Throwable> |
builder(@NotNull FlakyTestRunner.RunnableThrows<X> action)
Creates a builder for constructing a flaky test runner for an action that might throw checked exceptions.
|
static FlakyTestRunner.Builder<RuntimeException> |
builderUnchecked(@NotNull Runnable action)
Creates a builder for constructing a flaky test runner for an action that might throw unchecked exceptions.
|
public static <X extends Throwable> FlakyTestRunner.Builder<X> builder(@NotNull @NotNull FlakyTestRunner.RunnableThrows<X> action)
The flaky test runner can be customized to handle various testing scenarios where a test may fail intermittently.
X - Type of exception that can be thrownaction - Action to perform, potentially throwing checked exceptionspublic static FlakyTestRunner.Builder<RuntimeException> builderUnchecked(@NotNull @NotNull Runnable action)
Similar to builder(RunnableThrows), but specific to unchecked exceptions.
action - Action to perform, potentially throwing unchecked exceptionsCopyright © 2023. All rights reserved.