Search in sources :

Example 16 with StreamingOutputCallRequest

use of io.grpc.testing.integration.Messages.StreamingOutputCallRequest in project grpc-java by grpc.

the class AbstractInteropTest method maxInboundSize_exact.

@Test(timeout = 10000)
public void maxInboundSize_exact() {
    StreamingOutputCallRequest request = StreamingOutputCallRequest.newBuilder().addResponseParameters(ResponseParameters.newBuilder().setSize(1)).build();
    int size = blockingStub.streamingOutputCall(request).next().getSerializedSize();
    TestServiceGrpc.TestServiceBlockingStub stub = TestServiceGrpc.newBlockingStub(channel).withMaxInboundMessageSize(size);
    stub.streamingOutputCall(request).next();
}
Also used : StreamingOutputCallRequest(io.grpc.testing.integration.Messages.StreamingOutputCallRequest) Test(org.junit.Test)

Aggregations

StreamingOutputCallRequest (io.grpc.testing.integration.Messages.StreamingOutputCallRequest)16 Test (org.junit.Test)15 StreamingOutputCallResponse (io.grpc.testing.integration.Messages.StreamingOutputCallResponse)10 StatusRuntimeException (io.grpc.StatusRuntimeException)5 EchoStatus (io.grpc.testing.integration.Messages.EchoStatus)4 Metadata (io.grpc.Metadata)3 Status (io.grpc.Status)3 ArrayList (java.util.ArrayList)3 SimpleRequest (io.grpc.testing.integration.Messages.SimpleRequest)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 ByteString (com.google.protobuf.ByteString)1 ClientCall (io.grpc.ClientCall)1 ResponseParameters (io.grpc.testing.integration.Messages.ResponseParameters)1 SimpleResponse (io.grpc.testing.integration.Messages.SimpleResponse)1 ArrayBlockingQueue (java.util.concurrent.ArrayBlockingQueue)1