java.lang.Object
org.junit.jupiter.api.AssertTimeout
AssertTimeout is a collection of utility methods that support asserting
the execution of the code under test did not take longer than the timeout duration.- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidassertTimeout(Duration timeout, Executable executable) (package private) static voidassertTimeout(Duration timeout, Executable executable, String message) (package private) static voidassertTimeout(Duration timeout, Executable executable, Supplier<String> messageSupplier) (package private) static <T> TassertTimeout(Duration timeout, ThrowingSupplier<T> supplier) private static <T> TassertTimeout(Duration timeout, ThrowingSupplier<T> supplier, Object messageOrSupplier) (package private) static <T> TassertTimeout(Duration timeout, ThrowingSupplier<T> supplier, String message) (package private) static <T> TassertTimeout(Duration timeout, ThrowingSupplier<T> supplier, Supplier<String> messageSupplier)
-
Constructor Details
-
AssertTimeout
private AssertTimeout()
-
-
Method Details
-
assertTimeout
-
assertTimeout
-
assertTimeout
static void assertTimeout(Duration timeout, Executable executable, Supplier<String> messageSupplier) -
assertTimeout
-
assertTimeout
-
assertTimeout
static <T> T assertTimeout(Duration timeout, ThrowingSupplier<T> supplier, Supplier<String> messageSupplier) -
assertTimeout
private static <T> T assertTimeout(Duration timeout, ThrowingSupplier<T> supplier, Object messageOrSupplier)
-