use of io.grpc.android.integrationtest.nano.Messages.SimpleRequest in project grpc-java by grpc.
the class InteropTester method veryLargeRequest.
public void veryLargeRequest() throws Exception {
if (shouldSkip()) {
return;
}
final SimpleRequest request = new SimpleRequest();
request.payload = new Payload();
request.payload.type = Messages.COMPRESSABLE;
request.payload.body = new byte[unaryPayloadLength()];
request.responseSize = 10;
request.responseType = Messages.COMPRESSABLE;
final SimpleResponse goldenResponse = new SimpleResponse();
goldenResponse.payload = new Payload();
goldenResponse.payload.type = Messages.COMPRESSABLE;
goldenResponse.payload.body = new byte[10];
assertMessageEquals(goldenResponse, blockingStub.unaryCall(request));
}
use of io.grpc.android.integrationtest.nano.Messages.SimpleRequest in project grpc-java by grpc.
the class InteropTester method veryLargeResponse.
public void veryLargeResponse() throws Exception {
if (shouldSkip()) {
return;
}
final SimpleRequest request = new SimpleRequest();
request.responseSize = unaryPayloadLength();
request.responseType = Messages.COMPRESSABLE;
SimpleResponse resp = blockingStub.unaryCall(request);
final SimpleResponse goldenResponse = new SimpleResponse();
goldenResponse.payload = new Payload();
goldenResponse.payload.type = Messages.COMPRESSABLE;
goldenResponse.payload.body = new byte[unaryPayloadLength()];
assertMessageSizeEquals(goldenResponse, resp);
}
Aggregations