diff options
author | yangg <yangg@google.com> | 2014-12-12 16:14:43 -0800 |
---|---|---|
committer | Michael Lumish <mlumish@google.com> | 2014-12-15 14:25:44 -0800 |
commit | abd90a6c30d9766fef2923152cf0cd635fb8927b (patch) | |
tree | 3384c30c04437f9d7d3b46b98a75f07fbbed0206 | |
parent | 69ac39f4be7485d885aa69df1a621379f6fbf7ad (diff) |
Use '\0' instead of '0' in payload as java client actually checks that.
Change on 2014/12/12 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82023559
-rw-r--r-- | test/cpp/interop/client.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 987200f5c4..d447738734 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -114,7 +114,7 @@ void DoLargeUnary(std::shared_ptr<ChannelInterface> channel) { ClientContext context; request.set_response_type(grpc::testing::PayloadType::COMPRESSABLE); request.set_response_size(314159); - grpc::string payload(271828, '0'); + grpc::string payload(271828, '\0'); request.mutable_payload()->set_body(payload.c_str(), 271828); grpc::Status s = stub->UnaryCall(&context, request, &response); @@ -122,7 +122,7 @@ void DoLargeUnary(std::shared_ptr<ChannelInterface> channel) { GPR_ASSERT(s.IsOk()); GPR_ASSERT(response.payload().type() == grpc::testing::PayloadType::COMPRESSABLE); - GPR_ASSERT(response.payload().body().length() == 314159); + GPR_ASSERT(response.payload().body() == grpc::string(314159, '\0')); gpr_log(GPR_INFO, "Large unary done."); } |