diff options
author | Mark D. Roth <roth@google.com> | 2016-07-07 08:19:27 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-07-07 08:19:27 -0700 |
commit | dbf2adc9804e75c71e7a4158cdac21b11ce5d6c5 (patch) | |
tree | 8bae9ccea76057224f94e1ea6bccf8ad4695bd5a /test/cpp/interop/interop_server.cc | |
parent | 71ed007847622b8aff49136cbf77de4caa790d79 (diff) |
Fix C++ status_code_and_message test to comply with the spec.
Enable C++ test in run_interop_tests.py.
Diffstat (limited to 'test/cpp/interop/interop_server.cc')
-rw-r--r-- | test/cpp/interop/interop_server.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index ebef0002a3..bb6793d956 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -259,6 +259,11 @@ class TestServiceImpl : public TestService::Service { StreamingOutputCallResponse response; bool write_success = true; while (write_success && stream->Read(&request)) { + if (request.has_response_status()) { + return Status( + static_cast<grpc::StatusCode>(request.response_status().code()), + request.response_status().message()); + } if (request.response_parameters_size() != 0) { response.mutable_payload()->set_type(request.payload().type()); response.mutable_payload()->set_body( |