CompletableFuture. To check chains of Throwable causes, use FlinkAssertions.anyCauseMatches(String) or FlinkAssertions.anyCauseMatches(Class,
String)@Deprecated public class FlinkMatchers extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static org.hamcrest.Matcher<Throwable> |
containsCause(Class<? extends Throwable> failureCause)
已过时。
Checks for a
Throwable that matches by class. |
static org.hamcrest.Matcher<Throwable> |
containsCause(Throwable failureCause)
已过时。
Checks for a
Throwable that matches by class and message. |
static org.hamcrest.Matcher<Throwable> |
containsMessage(String errorMessage)
已过时。
Checks for a
Throwable that contains the expected error message. |
static <T,E extends Throwable> |
futureFailedWith(Class<E> exceptionType)
已过时。
Checks whether
CompletableFuture completed already exceptionally with a specific
exception type. |
static <T,E extends Throwable> |
futureWillCompleteExceptionally(Class<E> exceptionType,
java.time.Duration timeout)
已过时。
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)
已过时。
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)
已过时。
Checks whether
CompletableFuture will completed exceptionally within a certain time. |
static org.hamcrest.Matcher<CompletableFuture<?>> |
willNotComplete(java.time.Duration timeout)
已过时。
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–2023 The Apache Software Foundation. All rights reserved.