diff options
author | yang-g <yangg@google.com> | 2015-08-13 13:51:53 -0700 |
---|---|---|
committer | yang-g <yangg@google.com> | 2015-08-13 13:51:53 -0700 |
commit | f6befe86904260591cf117e2819ad8e0ea071679 (patch) | |
tree | b5bfd7cc31d2c2c7ce7d1637010ffe7d5ba97417 /test/cpp | |
parent | e9e69a80d4733cba06f4e5f6a3164418752da347 (diff) |
update the interop test protos and code to proto3
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/interop/interop_client.cc | 3 | ||||
-rw-r--r-- | test/cpp/interop/server.cc | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index dfb90fadc2..066877e0c6 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -316,7 +316,6 @@ void InteropClient::DoHalfDuplex() { unsigned int i = 0; StreamingOutputCallResponse response; while (stream->Read(&response)) { - GPR_ASSERT(response.payload().has_body()); GPR_ASSERT(response.payload().body() == grpc::string(response_stream_sizes[i], '\0')); ++i; @@ -346,7 +345,6 @@ void InteropClient::DoPingPong() { payload->set_body(grpc::string(request_stream_sizes[i], '\0')); GPR_ASSERT(stream->Write(request)); GPR_ASSERT(stream->Read(&response)); - GPR_ASSERT(response.payload().has_body()); GPR_ASSERT(response.payload().body() == grpc::string(response_stream_sizes[i], '\0')); } @@ -393,7 +391,6 @@ void InteropClient::DoCancelAfterFirstResponse() { StreamingOutputCallResponse response; GPR_ASSERT(stream->Write(request)); GPR_ASSERT(stream->Read(&response)); - GPR_ASSERT(response.payload().has_body()); GPR_ASSERT(response.payload().body() == grpc::string(31415, '\0')); gpr_log(GPR_INFO, "Trying to cancel..."); context.TryCancel(); diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 05a10de51e..4e809ed902 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -99,7 +99,7 @@ class TestServiceImpl : public TestService::Service { Status UnaryCall(ServerContext* context, const SimpleRequest* request, SimpleResponse* response) { - if (request->has_response_size() && request->response_size() > 0) { + if (request->response_size() > 0) { if (!SetPayload(request->response_type(), request->response_size(), response->mutable_payload())) { return Status(grpc::StatusCode::INTERNAL, "Error creating payload."); @@ -140,7 +140,7 @@ class TestServiceImpl : public TestService::Service { StreamingInputCallRequest request; int aggregated_payload_size = 0; while (reader->Read(&request)) { - if (request.has_payload() && request.payload().has_body()) { + if (request.has_payload()) { aggregated_payload_size += request.payload().body().size(); } } |