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
pull/1/merge
yangg 10 years ago committed by Michael Lumish
parent 69ac39f4be
commit abd90a6c30
  1. 4
      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.");
}

Loading…
Cancel
Save