use of io.servicetalk.grpc.api.GrpcStatusCode.INVALID_ARGUMENT in project servicetalk by apple.
the class SingleRequestOrResponseApiTest method serverResponseStreamingRouteFailsWithInvalidArgument.
private void serverResponseStreamingRouteFailsWithInvalidArgument(Iterable<TestRequest> requestItems, String expectedMsg) throws Exception {
// No need to run the test with different client-side, always use blocking client
assumeFalse(streamingClient);
try (BlockingTesterClient client = newBlockingClient()) {
GrpcStatusException e = assertThrows(GrpcStatusException.class, () -> client.testBiDiStream(requestItems).forEach(response -> {
/* noop */
}));
assertThat(e.status().code(), is(INVALID_ARGUMENT));
assertThat(e.status().description(), equalTo(expectedMsg));
}
}
Aggregations