T - The type of result of the CompletableFutureWaitResultBuilder2<T>public interface WaitResultBuilder1<T> extends WaitResultBuilder2<T>
CompletableFuture to skip, if necessary,
the error.| Modifier and Type | Method | Description |
|---|---|---|
default WaitResultBuilder2<T> |
dontIgnoreException() |
Explicitly indicate that no exception must be ignored.
|
default WaitResultBuilder2<T> |
ignoreException() |
Ignore any error during execution of the callable.
|
WaitResultBuilder2<T> |
ignoreException(boolean alsoDontFailWhenNoResultAndException) |
Ignore any error during execution of the callable and define if there are not
result and an exception at last operation if this exception must be thrown.
|
expecting, expectingAllOf, expectingAnyOf, expectingEqualsTo, expectingNot, expectingNotNullWaitResultBuilder2<T> ignoreException(boolean alsoDontFailWhenNoResultAndException)
alsoDontFailWhenNoResultAndException - true if the last exception must also be ignoredthe next step of the builderdefault WaitResultBuilder2<T> ignoreException()
the next step of the builderdefault WaitResultBuilder2<T> dontIgnoreException()
This this the normal behaviour. This method may be used to make it explicit in the code.
For example, the following code :
WaitResult.of(myCallable).dontIgnoreException().expecting(myPredicate).repeat(2)
.every(1000, TimeUnit.MILLISECONDS).get()
Throws an AssertionError if myCallable throws an exception.the next step of the builderCopyright © 2021. All rights reserved.