Class AssertableCallback<V>

java.lang.Object
java.util.concurrent.CountDownLatch
brave.test.util.AssertableCallback<V>
All Implemented Interfaces:
BiConsumer<V,​Throwable>

public final class AssertableCallback<V>
extends CountDownLatch
implements BiConsumer<V,​Throwable>
A callback of a single result or error that supports assertions.

This is a bridge to async libraries such as CompletableFuture complete, completeExceptionally.

Implementations will call either onSuccess(V) or onError(java.lang.Throwable), but not both.