aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-09-07 11:28:56 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-09-07 11:28:56 -0700
commitbd37a21c2605abcd07f0aea2e4ddb258a88eda22 (patch)
tree04c140bec14fa30466978588a7e09b6564f88cac /test/cpp
parentfd4c6471ce543f1185a1e46643943f551d675807 (diff)
Cleanup, debug support
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/end2end/thread_stress_test.cc5
-rw-r--r--test/cpp/qps/client_sync.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc
index b021b34523..ebede19a7f 100644
--- a/test/cpp/end2end/thread_stress_test.cc
+++ b/test/cpp/end2end/thread_stress_test.cc
@@ -339,7 +339,10 @@ static void SendRpc(grpc::testing::EchoTestService::Stub* stub, int num_rpcs) {
ClientContext context;
Status s = stub->Echo(&context, request, &response);
EXPECT_EQ(response.message(), request.message());
- EXPECT_TRUE(s.ok());
+ if (!s.ok()) {
+ gpr_log(GPR_ERROR, "RPC error: %d: %s", s.error_code(), s.error_message().c_str());
+ }
+ ASSERT_TRUE(s.ok());
}
}
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index 8062424a1f..ef54b4b766 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -130,6 +130,9 @@ 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();
}
};