aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-08-13 11:29:50 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-08-13 11:29:50 -0700
commit93dfab9c6ecfaa31a890c3b4657dfe5a515dacbf (patch)
tree72da12fe4cad946513fe2ef548b4a207091e60c8 /test/cpp
parentba86dc0cbe8688a72ce3b50c03cf6934b2d17d64 (diff)
Make sure COMPRESSABLE is the default for LargeUnary
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/interop/interop_client.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index 1f30260f0e..bc5b7adb1c 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -102,6 +102,11 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request,
ClientContext context;
InteropClientContextInspector inspector(context);
+ // If the request doesn't already specify the response type, default to
+ // COMPRESSABLE.
+ if (!request->has_response_type()) {
+ request->set_response_type(PayloadType::COMPRESSABLE);
+ }
request->set_response_size(kLargeResponseSize);
grpc::string payload(kLargeRequestSize, '\0');
request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize);
@@ -248,6 +253,7 @@ void InteropClient::DoLargeUnary() {
gpr_log(GPR_INFO, "Sending a large unary rpc...");
SimpleRequest request;
SimpleResponse response;
+ request.set_response_type(PayloadType::COMPRESSABLE);
PerformLargeUnary(&request, &response);
gpr_log(GPR_INFO, "Large unary done.");
}