diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-04-09 12:23:21 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-04-09 12:23:21 -0700 |
commit | 8221e40ac0e11f4c4eea7c72dd962a0318686426 (patch) | |
tree | 494881dd8da1df8934527568d12444660f3b8972 /test/cpp | |
parent | 1c61af73643fff22f7e0dda08d73b812ffffcb9f (diff) |
Indentation fixes, s/11/1/g
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/qps/client_async.cc | 2 | ||||
-rw-r--r-- | test/cpp/qps/server_async.cc | 20 |
2 files changed, 12 insertions, 10 deletions
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 8b0619d5fc..7e2850dd65 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -310,7 +310,7 @@ class AsyncStreamingClient GRPC_FINAL : public Client { bool ThreadFunc(Histogram *histogram, size_t thread_idx) GRPC_OVERRIDE { void *got_tag; bool ok; - switch (cli_cqs_[thread_idx]->AsyncNext(&got_tag, &ok, std::chrono::system_clock::now() + std::chrono::seconds(11))) { + switch (cli_cqs_[thread_idx]->AsyncNext(&got_tag, &ok, std::chrono::system_clock::now() + std::chrono::seconds(1))) { case CompletionQueue::SHUTDOWN: return false; case CompletionQueue::TIMEOUT: return true; case CompletionQueue::GOT_EVENT: break; diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 65c170af81..9a176638e8 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -97,15 +97,15 @@ class AsyncQpsServerTest : public Server { bool ok; void* got_tag; while (srv_cq_.Next(&got_tag, &ok)) { - ServerRpcContext* ctx = detag(got_tag); - // The tag is a pointer to an RPC context to invoke - if (ctx->RunNextState(ok) == false) { - // this RPC context is done, so refresh it + ServerRpcContext* ctx = detag(got_tag); + // The tag is a pointer to an RPC context to invoke + if (ctx->RunNextState(ok) == false) { + // this RPC context is done, so refresh it std::lock_guard<std::mutex> g(shutdown_mutex_); if (!shutdown_) { ctx->Reset(); } - } + } } return; })); @@ -175,8 +175,9 @@ class AsyncQpsServerTest : public Server { private: bool finisher(bool) { return false; } bool invoker(bool ok) { - if (!ok) - return false; + if (!ok) { + return false; + } ResponseType response; @@ -230,8 +231,9 @@ class AsyncQpsServerTest : public Server { private: bool request_done(bool ok) { - if (!ok) - return false; + if (!ok) { + return false; + } stream_.Read(&req_, AsyncQpsServerTest::tag(this)); next_state_ = &ServerRpcContextStreamingImpl::read_done; return true; |