aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2015-08-31 16:27:35 -0700
committerGravatar vjpai <vpai@google.com>2015-08-31 16:27:35 -0700
commitd514b21cc842fc388eec4e7c260b2c6a3de27c17 (patch)
treecd8aa97d6f4c31aba2602bbcc1dc820f6192a05f
parent4668600d116f53a1c391c07f88c01c3bbdf6c704 (diff)
Put timeout on server shutdown
-rw-r--r--test/cpp/qps/server_async.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 4160392cbe..d51de8bd7f 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -101,7 +101,9 @@ class AsyncQpsServerTest : public Server {
}
}
~AsyncQpsServerTest() {
- server_->Shutdown();
+ auto deadline = std::chrono::high_resolution_clock::now() +
+ std::chrono::seconds(10);
+ server_->Shutdown(deadline);
for (auto ss = shutdown_state_.begin(); ss != shutdown_state_.end(); ++ss) {
(*ss)->set_shutdown();
}