use of io.grpc.android.integrationtest.nano.Messages.StreamingInputCallResponse in project grpc-java by grpc.
the class InteropTester method cancelAfterBegin.
public void cancelAfterBegin() throws Exception {
StreamRecorder<StreamingInputCallResponse> responseObserver = StreamRecorder.create();
StreamObserver<StreamingInputCallRequest> requestObserver = asyncStub.streamingInputCall(responseObserver);
requestObserver.onError(new RuntimeException());
assertTrue(responseObserver.awaitCompletion(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
assertEquals(Arrays.<StreamingInputCallResponse>asList(), responseObserver.getValues());
assertCodeEquals(io.grpc.Status.CANCELLED, io.grpc.Status.fromThrowable(responseObserver.getError()));
}
Aggregations