diff options
author | David Garcia Quintas <dgq@google.com> | 2015-08-11 15:21:02 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-08-11 15:21:02 -0700 |
commit | 616b375e3510a8572f6dbd22d4602bf3ca8c6245 (patch) | |
tree | b2f8961e6f9bbd309330a47debfb9ecdf9e571c4 /test/cpp/interop | |
parent | 2e1bb1bf4da91d7f9c8d3b2be864ed15574d5670 (diff) |
Merged PerformLargeCompressedUnary into PerformLargeUnary
Diffstat (limited to 'test/cpp/interop')
-rw-r--r-- | test/cpp/interop/interop_client.cc | 21 | ||||
-rw-r--r-- | test/cpp/interop/interop_client.h | 2 |
2 files changed, 3 insertions, 20 deletions
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index a43225011e..fc0e325e41 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -101,23 +101,8 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request, std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_)); ClientContext context; - 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); - - Status s = stub->UnaryCall(&context, *request, response); - - AssertOkOrPrintErrorStatus(s); -} - -// Shared code to set large payload, make rpc and check response payload. -void InteropClient::PerformLargeCompressedUnary(SimpleRequest* request, - SimpleResponse* response) { - std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_)); - - ClientContext context; InteropClientContextInspector inspector(context); + 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); @@ -278,13 +263,13 @@ void InteropClient::DoLargeCompressedUnary() { CompressionType_Name(compression_type).c_str(), PayloadType_Name(payload_type).c_str()); - gpr_log(GPR_INFO, "Sending a large unary rpc %s.", log_suffix); + gpr_log(GPR_INFO, "Sending a large compressed unary rpc %s.", log_suffix); SimpleRequest request; SimpleResponse response; request.set_response_type(payload_type); request.set_response_compression(compression_type); PerformLargeUnary(&request, &response); - gpr_log(GPR_INFO, "Large unary done %s.", log_suffix); + gpr_log(GPR_INFO, "Large compressed unary done %s.", log_suffix); gpr_free(log_suffix); } } diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index 995b13036a..d6fb9bff39 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -80,8 +80,6 @@ class InteropClient { private: void PerformLargeUnary(SimpleRequest* request, SimpleResponse* response); - void PerformLargeCompressedUnary(SimpleRequest* request, - SimpleResponse* response); void AssertOkOrPrintErrorStatus(const Status& s); std::shared_ptr<ChannelInterface> channel_; |