From ad7c52761895c46a3964ab8864d11c7aa269a29b Mon Sep 17 00:00:00 2001
From: Vijay Pai <vpai@google.com>
Date: Wed, 13 Jul 2016 14:51:44 -0700
Subject: [PATCH] Temporary workaround by setting up a deadline on server
 shutdown. This reveals an issue that needs to be solved: D0713
 14:48:28.049861213   14503 server.c:704]               Waiting for 44
 channels and 0/1 listeners to be destroyed before shutting down server

---
 test/cpp/qps/server_async.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 85acefa00b..da1a289e02 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -131,7 +131,10 @@ class AsyncQpsServerTest : public Server {
       std::lock_guard<std::mutex> lock((*ss)->mutex);
       (*ss)->shutdown = true;
     }
-    server_->Shutdown();
+    // 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);
     for (auto cq = srv_cqs_.begin(); cq != srv_cqs_.end(); ++cq) {
       (*cq)->Shutdown();
     }
-- 
GitLab