use of io.servicetalk.concurrent.test.internal.TestCompletableSubscriber in project servicetalk by apple.
the class CompletableConcatWithCompletablesTest method setUp.
@BeforeEach
void setUp() {
subscriber = new TestCompletableSubscriber();
source = new TestCompletable();
}
use of io.servicetalk.concurrent.test.internal.TestCompletableSubscriber in project servicetalk by apple.
the class CompletableConcatWithCompletableTest method setUp.
@BeforeEach
void setUp() {
subscriber = new TestCompletableSubscriber();
source = new TestCompletable();
next = new TestCompletable();
}
use of io.servicetalk.concurrent.test.internal.TestCompletableSubscriber in project servicetalk by apple.
the class ChannelSetTest method closeAsyncGracefullyWithoutNettyConnectionChannelHandler.
@Test
void closeAsyncGracefullyWithoutNettyConnectionChannelHandler() {
when(mockClosableAttribute.getAndSet(any())).thenReturn(null);
Completable completable = closeAsyncGracefully(fixture, 100, SECONDS);
verify(channel, never()).close();
TestCompletableSubscriber subscriber = new TestCompletableSubscriber();
toSource(completable).subscribe(subscriber);
verify(channel).close();
subscriber.awaitOnComplete();
}
use of io.servicetalk.concurrent.test.internal.TestCompletableSubscriber in project servicetalk by apple.
the class ChannelSetTest method testCloseAsyncGracefullyTwice.
@Test
void testCloseAsyncGracefullyTwice() throws Exception {
Completable gracefulCompletable1 = closeAsyncGracefully(fixture, 60, SECONDS);
Completable gracefulCompletable2 = closeAsyncGracefully(fixture, 60, SECONDS);
TestCompletableSubscriber subscriber = new TestCompletableSubscriber();
toSource(gracefulCompletable1).subscribe(subscriber);
verify(nettyConnection).closeAsyncGracefullyNoOffload();
TestCompletableSubscriber subscriber2 = new TestCompletableSubscriber();
toSource(gracefulCompletable2).subscribe(subscriber2);
verify(nettyConnection, times(1)).closeAsyncGracefullyNoOffload();
assertThat(subscriber.pollTerminal(10, MILLISECONDS), is(nullValue()));
closeAsyncGracefullyCompletable.onComplete();
assertThat(subscriber.pollTerminal(10, MILLISECONDS), is(nullValue()));
listener.operationComplete(channelCloseFuture);
fixture.onClose().toFuture().get();
subscriber.awaitOnComplete();
subscriber2.awaitOnComplete();
}
use of io.servicetalk.concurrent.test.internal.TestCompletableSubscriber in project servicetalk by apple.
the class DefaultNettyConnectionTest method testSequentialPubAndPub.
@Test
void testSequentialPubAndPub() {
testWritePublisher();
writeListener = new TestCompletableSubscriber();
testWritePublisher();
}
Aggregations