aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/client_sync.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-27 15:29:49 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-27 15:29:49 -0700
commit86cb138ee9c852839dfd33529e8634ffe09d896e (patch)
tree6b61d76428c682a937fccf8ced4182fc6b9f3f93 /test/cpp/qps/client_sync.cc
parent6476170c4bf90c8e29e9d26049f0cffe15c51709 (diff)
Handle failed calls in sync client
Diffstat (limited to 'test/cpp/qps/client_sync.cc')
-rw-r--r--test/cpp/qps/client_sync.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index 0ccf4e270b..f61e80d76b 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -130,11 +130,8 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient {
grpc::Status s =
stub->UnaryCall(&context, request_, &responses_[thread_idx]);
entry->set_value((UsageTimer::Now() - start) * 1e9);
- if (!s.ok()) {
- gpr_log(GPR_ERROR, "RPC error: %d: %s", s.error_code(),
- s.error_message().c_str());
- }
- return s.ok();
+ entry->set_status(s.error_code());
+ return true;
}
};