diff --git a/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java b/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java index fbd2afcaec..e1823603d8 100644 --- a/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java +++ b/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java @@ -90,7 +90,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService { public void unaryCall(SimpleRequest req, StreamObserver responseObserver) { SimpleResponse.Builder responseBuilder = SimpleResponse.newBuilder(); - if (req.hasResponseType() && req.hasResponseSize()) { + if (req.getResponseSize() != 0) { boolean compressable = compressableResponse(req.getResponseType()); ByteString dataBuffer = compressable ? compressableBuffer : uncompressableBuffer; // For consistency with the c++ TestServiceImpl, use a random offset for unary calls.