From d514b21cc842fc388eec4e7c260b2c6a3de27c17 Mon Sep 17 00:00:00 2001 From: vjpai Date: Mon, 31 Aug 2015 16:27:35 -0700 Subject: [PATCH] Put timeout on server shutdown --- test/cpp/qps/server_async.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 4160392cbec..d51de8bd7f6 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(); }