use of io.servicetalk.grpc.netty.TesterProto.Tester.ServiceFactory in project servicetalk by apple.
the class ClosureTest method blockingServiceImplIsClosed.
@ParameterizedTest(name = "graceful? => {0}")
@ValueSource(booleans = { true, false })
void blockingServiceImplIsClosed(final boolean param) throws Exception {
setUp(param);
CloseSignal signal = new CloseSignal(1);
BlockingTesterService svc = setupBlockingCloseMock(mock(BlockingTesterService.class), signal);
startServerAndClose(new ServiceFactory(svc), signal);
verifyClosure(svc, 4);
signal.verifyCloseAtLeastCount(closeGracefully);
}
use of io.servicetalk.grpc.netty.TesterProto.Tester.ServiceFactory in project servicetalk by apple.
the class ErrorHandlingTest method setupForServiceThrows.
private ServiceFactory setupForServiceThrows(final Throwable toThrow) {
final TesterService service = mockTesterService();
setupForServiceThrows(service, toThrow);
return new ServiceFactory(service);
}
use of io.servicetalk.grpc.netty.TesterProto.Tester.ServiceFactory in project servicetalk by apple.
the class ErrorHandlingTest method setupForServiceEmitsDataThenError.
private ServiceFactory setupForServiceEmitsDataThenError(final Throwable toThrow) {
final TesterService service = mockTesterService();
setupForServiceEmitsDataThenError(service, toThrow);
return new ServiceFactory(service);
}
use of io.servicetalk.grpc.netty.TesterProto.Tester.ServiceFactory in project servicetalk by apple.
the class ErrorHandlingTest method setupForBlockingServiceThrows.
private ServiceFactory setupForBlockingServiceThrows(final Throwable toThrow) throws Exception {
final BlockingTesterService blockingService = mock(BlockingTesterService.class);
setupForBlockingServiceThrows(blockingService, toThrow);
return new ServiceFactory(blockingService);
}
Aggregations