use of io.servicetalk.concurrent.api.TestCancellable in project servicetalk by apple.
the class SingleConcatWithCompletableTest method testCancelNext.
@Test
void testCancelNext() {
source.onSuccess(1);
assertThat(subscriber.pollTerminal(10, MILLISECONDS), is(nullValue()));
subscriber.awaitSubscription().cancel();
TestCancellable sourceCancellable = new TestCancellable();
source.onSubscribe(sourceCancellable);
assertFalse(sourceCancellable.isCancelled());
TestCancellable nextCancellable = new TestCancellable();
next.onSubscribe(nextCancellable);
assertTrue(nextCancellable.isCancelled());
}
Aggregations