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 ofThrowablecauses, 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 aThrowablethat matches by class.static org.hamcrest.Matcher<Throwable>containsCause(Throwable failureCause)Deprecated.Checks for aThrowablethat matches by class and message.static org.hamcrest.Matcher<Throwable>containsMessage(String errorMessage)Deprecated.Checks for aThrowablethat contains the expected error message.static <T,E extends Throwable>
org.apache.flink.core.testutils.FlinkMatchers.FutureFailedMatcher<T>futureFailedWith(Class<E> exceptionType)Deprecated.Checks whetherCompletableFuturecompleted already exceptionally with a specific exception type.static <T,E extends Throwable>
org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T>futureWillCompleteExceptionally(Class<E> exceptionType, java.time.Duration timeout)Deprecated.Checks whetherCompletableFuturewill completed exceptionally within a certain time.static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T>futureWillCompleteExceptionally(java.time.Duration timeout)Deprecated.Checks whetherCompletableFuturewill 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 whetherCompletableFuturewill completed exceptionally within a certain time.static org.hamcrest.Matcher<CompletableFuture<?>>willNotComplete(java.time.Duration timeout)Deprecated.Checks that aCompletableFuturewon'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 whetherCompletableFuturecompleted 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, java.time.Duration timeout)
Deprecated.Checks whetherCompletableFuturewill completed exceptionally within a certain time.
-
futureWillCompleteExceptionally
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)
Deprecated.Checks whetherCompletableFuturewill completed exceptionally within a certain time.
-
futureWillCompleteExceptionally
public static <T> org.apache.flink.core.testutils.FlinkMatchers.FutureWillFailMatcher<T> futureWillCompleteExceptionally(java.time.Duration timeout)
Deprecated.Checks whetherCompletableFuturewill completed exceptionally within a certain time.
-
containsCause
public static org.hamcrest.Matcher<Throwable> containsCause(Class<? extends Throwable> failureCause)
Deprecated.Checks for aThrowablethat matches by class.
-
containsCause
public static org.hamcrest.Matcher<Throwable> containsCause(Throwable failureCause)
Deprecated.Checks for aThrowablethat matches by class and message.
-
containsMessage
public static org.hamcrest.Matcher<Throwable> containsMessage(String errorMessage)
Deprecated.Checks for aThrowablethat contains the expected error message.
-
willNotComplete
public static org.hamcrest.Matcher<CompletableFuture<?>> willNotComplete(java.time.Duration timeout)
Deprecated.Checks that aCompletableFuturewon't complete within the given timeout.
-
-