From 616b375e3510a8572f6dbd22d4602bf3ca8c6245 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 11 Aug 2015 15:21:02 -0700 Subject: Merged PerformLargeCompressedUnary into PerformLargeUnary --- test/cpp/interop/interop_client.cc | 21 +++------------------ test/cpp/interop/interop_client.h | 2 -- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'test/cpp/interop') 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 @@ -100,24 +100,9 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request, SimpleResponse* response) { std::unique_ptr 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 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 channel_; -- cgit v1.2.3