Skip to content
Snippets Groups Projects
Commit b019d61f authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix benchmark shutdown

parent 1409dbf5
No related branches found
No related tags found
No related merge requests found
......@@ -132,8 +132,11 @@ class AsyncQpsServerTest : public Server {
(*ss)->shutdown = true;
}
// TODO (vpai): Remove this deadline and allow Shutdown to finish properly
auto deadline = std::chrono::system_clock::now() + std::chrono::seconds(3);
server_->Shutdown(deadline);
std::thread shutdown_thread([this]() {
auto deadline =
std::chrono::system_clock::now() + std::chrono::seconds(3);
server_->Shutdown(deadline);
});
for (auto cq = srv_cqs_.begin(); cq != srv_cqs_.end(); ++cq) {
(*cq)->Shutdown();
}
......@@ -146,6 +149,7 @@ class AsyncQpsServerTest : public Server {
while ((*cq)->Next(&got_tag, &ok))
;
}
shutdown_thread.join();
}
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment