diff options
author | Sree Kuchibhotla <sreek@google.com> | 2016-05-16 11:06:30 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2016-05-16 11:06:30 -0700 |
commit | 4790263c5f20865ed4279f479b184205dd7209b4 (patch) | |
tree | 2ee321081bdad50b32587fe4b8215e5d01d24042 /test/cpp/end2end/test_service_impl.cc | |
parent | 088891119f17b827b4f45f09e39411f007618ddf (diff) | |
parent | 1ba1bba66a18b6b7986a1cfa52c6f1ac4a14a029 (diff) |
Merge branch 'master' into server_channel_affinity
Diffstat (limited to 'test/cpp/end2end/test_service_impl.cc')
-rw-r--r-- | test/cpp/end2end/test_service_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index 2f5dd6d49e..cbaee92228 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -135,6 +135,14 @@ Status TestServiceImpl::Echo(ServerContext* context, const EchoRequest* request, context->AddTrailingMetadata(ToString(iter->first), ToString(iter->second)); } + // Terminate rpc with error and debug info in trailer. + if (request->param().debug_info().stack_entries_size() || + !request->param().debug_info().detail().empty()) { + grpc::string serialized_debug_info = + request->param().debug_info().SerializeAsString(); + context->AddTrailingMetadata(kDebugInfoTrailerKey, serialized_debug_info); + return Status::CANCELLED; + } } if (request->has_param() && (request->param().expected_client_identity().length() > 0 || |