CompletableFuture
. To check chains of Throwable
causes, use FlinkAssertions.anyCauseMatches(String)
or FlinkAssertions.anyCauseMatches(Class,
String)
@Deprecated public class FlinkMatchers extends Object
Modifier and Type | Method and Description |
---|---|
static org.hamcrest.Matcher<Throwable> |
containsCause(Class<? extends Throwable> failureCause)
Deprecated.
Checks for a
Throwable that matches by class. |
static org.hamcrest.Matcher<Throwable> |
containsCause(Throwable failureCause)
Deprecated.
Checks for a
Throwable that matches by class and message. |
static org.hamcrest.Matcher<Throwable> |
containsMessage(String errorMessage)
Deprecated.
Checks for a
Throwable that contains the expected error message. |
static <T,E extends Throwable> |
futureFailedWith(Class<E> exceptionType)
Deprecated.
Checks whether
CompletableFuture completed already exceptionally with a specific
exception type. |
static <T,E extends Throwable> |
futureWillCompleteExceptionally(Class<E> exceptionType,
java.time.Duration timeout)
Deprecated.
Checks whether
CompletableFuture will completed exceptionally within a certain time. |
static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> |
futureWillCompleteExceptionally(java.time.Duration timeout)
Deprecated.
Checks whether
CompletableFuture will completed exceptionally within a certain time. |
static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> |
futureWillCompleteExceptionally(java.util.function.Function<Throwable,Boolean> exceptionCheck,
java.time.Duration timeout,
String checkDescription)
Deprecated.
Checks whether
CompletableFuture will completed exceptionally within a certain time. |
static org.hamcrest.Matcher<CompletableFuture<?>> |
willNotComplete(java.time.Duration timeout)
Deprecated.
Checks that a
CompletableFuture won't complete within the given timeout. |
public static <T,E extends Throwable> org.apache.flink.core.testutils.FlinkMatchers.FutureFailedMatcher<T> futureFailedWith(Class<E> exceptionType)
CompletableFuture
completed already exceptionally with a specific
exception type.public static <T,E extends Throwable> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(Class<E> exceptionType, java.time.Duration timeout)
CompletableFuture
will completed exceptionally within a certain time.public static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(java.util.function.Function<Throwable,Boolean> exceptionCheck, java.time.Duration timeout, String checkDescription)
CompletableFuture
will completed exceptionally within a certain time.public static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(java.time.Duration timeout)
CompletableFuture
will completed exceptionally within a certain time.public static org.hamcrest.Matcher<Throwable> containsCause(Class<? extends Throwable> failureCause)
Throwable
that matches by class.public static org.hamcrest.Matcher<Throwable> containsCause(Throwable failureCause)
Throwable
that matches by class and message.public static org.hamcrest.Matcher<Throwable> containsMessage(String errorMessage)
Throwable
that contains the expected error message.public static org.hamcrest.Matcher<CompletableFuture<?>> willNotComplete(java.time.Duration timeout)
CompletableFuture
won't complete within the given timeout.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.