Package org.apache.flink.core.testutils
Class FlinkMatchers
- java.lang.Object
-
- org.apache.flink.core.testutils.FlinkMatchers
-
@Deprecated public class FlinkMatchers extends Object
Deprecated.You should assertj assertions, which have built-in assertions forCompletableFuture
. To check chains ofThrowable
causes, useFlinkAssertions.anyCauseMatches(String)
orFlinkAssertions.anyCauseMatches(Class, String)
Some reusable hamcrest matchers for Flink.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.hamcrest.Matcher<Throwable>
containsCause(Class<? extends Throwable> failureCause)
Deprecated.Checks for aThrowable
that matches by class.static org.hamcrest.Matcher<Throwable>
containsCause(Throwable failureCause)
Deprecated.Checks for aThrowable
that matches by class and message.static org.hamcrest.Matcher<Throwable>
containsMessage(String errorMessage)
Deprecated.Checks for aThrowable
that contains the expected error message.static <T,E extends Throwable>
org.apache.flink.core.testutils.FlinkMatchers.FutureFailedMatcher<T>futureFailedWith(Class<E> exceptionType)
Deprecated.Checks whetherCompletableFuture
completed already exceptionally with a specific exception type.static <T,E extends Throwable>
org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T>futureWillCompleteExceptionally(Class<E> exceptionType, Duration timeout)
Deprecated.Checks whetherCompletableFuture
will completed exceptionally within a certain time.static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T>
futureWillCompleteExceptionally(Duration timeout)
Deprecated.Checks whetherCompletableFuture
will completed exceptionally within a certain time.static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T>
futureWillCompleteExceptionally(Function<Throwable,Boolean> exceptionCheck, Duration timeout, String checkDescription)
Deprecated.Checks whetherCompletableFuture
will completed exceptionally within a certain time.static org.hamcrest.Matcher<CompletableFuture<?>>
willNotComplete(Duration timeout)
Deprecated.Checks that aCompletableFuture
won't complete within the given timeout.
-
-
-
Method Detail
-
futureFailedWith
public static <T,E extends Throwable> org.apache.flink.core.testutils.FlinkMatchers.FutureFailedMatcher<T> futureFailedWith(Class<E> exceptionType)
Deprecated.Checks whetherCompletableFuture
completed already exceptionally with a specific exception type.
-
futureWillCompleteExceptionally
public static <T,E extends Throwable> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(Class<E> exceptionType, Duration timeout)
Deprecated.Checks whetherCompletableFuture
will completed exceptionally within a certain time.
-
futureWillCompleteExceptionally
public static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(Function<Throwable,Boolean> exceptionCheck, Duration timeout, String checkDescription)
Deprecated.Checks whetherCompletableFuture
will completed exceptionally within a certain time.
-
futureWillCompleteExceptionally
public static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(Duration timeout)
Deprecated.Checks whetherCompletableFuture
will completed exceptionally within a certain time.
-
containsCause
public static org.hamcrest.Matcher<Throwable> containsCause(Class<? extends Throwable> failureCause)
Deprecated.Checks for aThrowable
that matches by class.
-
containsCause
public static org.hamcrest.Matcher<Throwable> containsCause(Throwable failureCause)
Deprecated.Checks for aThrowable
that matches by class and message.
-
containsMessage
public static org.hamcrest.Matcher<Throwable> containsMessage(String errorMessage)
Deprecated.Checks for aThrowable
that contains the expected error message.
-
willNotComplete
public static org.hamcrest.Matcher<CompletableFuture<?>> willNotComplete(Duration timeout)
Deprecated.Checks that aCompletableFuture
won't complete within the given timeout.
-
-