aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-04-09 10:56:06 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-04-09 10:56:06 -0700
commitaa2fca5a4830044f183b2ede7e593702d8b8826d (patch)
treebde8b71f685f492f458b0240af451960e64b048a
parent2c2cf6d2c57ac4ade74f8e4bc664f0fcc2db1e10 (diff)
Remove asserts
-rw-r--r--test/cpp/qps/client_async.cc16
-rw-r--r--test/cpp/qps/client_sync.cc6
2 files changed, 5 insertions, 17 deletions
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 1ed3c7157f..b07620140e 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -137,13 +137,7 @@ class AsyncUnaryClient GRPC_FINAL : public Client {
cli_cqs_.emplace_back(new CompletionQueue);
}
- auto payload_size = config.payload_size();
- auto check_done = [payload_size](grpc::Status s, SimpleResponse* response) {
- GPR_ASSERT(s.IsOk() && (response->payload().type() ==
- grpc::testing::PayloadType::COMPRESSABLE) &&
- (response->payload().body().length() ==
- static_cast<size_t>(payload_size)));
- };
+ auto check_done = [](grpc::Status s, SimpleResponse* response) {};
int t = 0;
for (int i = 0; i < config.outstanding_rpcs_per_channel(); i++) {
@@ -270,13 +264,7 @@ class AsyncStreamingClient GRPC_FINAL : public Client {
cli_cqs_.emplace_back(new CompletionQueue);
}
- auto payload_size = config.payload_size();
- auto check_done = [payload_size](grpc::Status s, SimpleResponse *response) {
- GPR_ASSERT(s.IsOk() && (response->payload().type() ==
- grpc::testing::PayloadType::COMPRESSABLE) &&
- (response->payload().body().length() ==
- static_cast<size_t>(payload_size)));
- };
+ auto check_done = [](grpc::Status s, SimpleResponse* response) {};
int t = 0;
for (int i = 0; i < config.outstanding_rpcs_per_channel(); i++) {
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index 77da1725ff..46eb3b8d74 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -113,9 +113,9 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
void ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE {
double start = Timer::Now();
- EXPECT_TRUE(stream_->Write(request_));
- EXPECT_TRUE(stream_->Read(&responses_[thread_idx]));
- histogram->Add((Timer::Now() - start) * 1e9);
+ if (stream_->Write(request_) && stream_->Read(&responses_[thread_idx])) {
+ histogram->Add((Timer::Now() - start) * 1e9);
+ }
}
private:
grpc::ClientContext context_;