use of io.servicetalk.grpc.netty.TesterProto.Tester.BlockingTestResponseStreamRpc in project servicetalk by apple.
the class ClosureTest method mixedModeRpcMethodsAreClosed.
@ParameterizedTest(name = "graceful? => {0}")
@ValueSource(booleans = { true, false })
void mixedModeRpcMethodsAreClosed(final boolean param) throws Exception {
setUp(param);
CloseSignal signal = new CloseSignal(4);
TestRpc testRpc = setupCloseMock(mock(TestRpc.class), signal);
TestRequestStreamRpc testRequestStreamRpc = setupCloseMock(mock(TestRequestStreamRpc.class), signal);
BlockingTestResponseStreamRpc testResponseStreamRpc = setupBlockingCloseMock(mock(BlockingTestResponseStreamRpc.class), signal);
BlockingTestBiDiStreamRpc testBiDiStreamRpc = setupBlockingCloseMock(mock(BlockingTestBiDiStreamRpc.class), signal);
startServerAndClose(new ServiceFactory.Builder().test(testRpc).testRequestStream(testRequestStreamRpc).testResponseStreamBlocking(testResponseStreamRpc).testBiDiStreamBlocking(testBiDiStreamRpc).build(), signal);
verifyClosure(testRpc);
verifyClosure(testRequestStreamRpc);
verifyClosure(testResponseStreamRpc);
verifyClosure(testBiDiStreamRpc);
signal.verifyClose(closeGracefully);
}
use of io.servicetalk.grpc.netty.TesterProto.Tester.BlockingTestResponseStreamRpc in project servicetalk by apple.
the class ClosureTest method blockingRpcMethodsAreClosed.
@ParameterizedTest(name = "graceful? => {0}")
@ValueSource(booleans = { true, false })
void blockingRpcMethodsAreClosed(final boolean param) throws Exception {
setUp(param);
CloseSignal signal = new CloseSignal(4);
BlockingTestRpc testRpc = setupBlockingCloseMock(mock(BlockingTestRpc.class), signal);
BlockingTestRequestStreamRpc testRequestStreamRpc = setupBlockingCloseMock(mock(BlockingTestRequestStreamRpc.class), signal);
BlockingTestResponseStreamRpc testResponseStreamRpc = setupBlockingCloseMock(mock(BlockingTestResponseStreamRpc.class), signal);
BlockingTestBiDiStreamRpc testBiDiStreamRpc = setupBlockingCloseMock(mock(BlockingTestBiDiStreamRpc.class), signal);
startServerAndClose(new ServiceFactory.Builder().testBlocking(testRpc).testRequestStreamBlocking(testRequestStreamRpc).testResponseStreamBlocking(testResponseStreamRpc).testBiDiStreamBlocking(testBiDiStreamRpc).build(), signal);
verifyClosure(testRpc);
verifyClosure(testRequestStreamRpc);
verifyClosure(testResponseStreamRpc);
verifyClosure(testBiDiStreamRpc);
signal.verifyClose(closeGracefully);
}
Aggregations