diff options
author | vjpai <vpai@google.com> | 2015-08-31 16:27:35 -0700 |
---|---|---|
committer | vjpai <vpai@google.com> | 2015-08-31 16:27:35 -0700 |
commit | d514b21cc842fc388eec4e7c260b2c6a3de27c17 (patch) | |
tree | cd8aa97d6f4c31aba2602bbcc1dc820f6192a05f | |
parent | 4668600d116f53a1c391c07f88c01c3bbdf6c704 (diff) |
Put timeout on server shutdown
-rw-r--r-- | test/cpp/qps/server_async.cc | 4 |
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(); } |