aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/server_async.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps/server_async.cc')
-rw-r--r--test/cpp/qps/server_async.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 77415f42ce..516598a0e2 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -35,9 +35,6 @@
#include <functional>
#include <memory>
#include <mutex>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/signal.h>
#include <thread>
#include <gflags/gflags.h>
@@ -49,7 +46,7 @@
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
+#include <grpc++/security/server_credentials.h>
#include <gtest/gtest.h>
#include "test/cpp/qps/qpstest.grpc.pb.h"
@@ -71,7 +68,7 @@ class AsyncQpsServerTest : public Server {
builder.RegisterAsyncService(&async_service_);
for (int i = 0; i < config.threads(); i++) {
- srv_cqs_.emplace_back(std::move(builder.AddCompletionQueue()));
+ srv_cqs_.emplace_back(builder.AddCompletionQueue());
}
server_ = builder.BuildAndStart();
@@ -101,7 +98,9 @@ class AsyncQpsServerTest : public Server {
}
}
~AsyncQpsServerTest() {
- server_->Shutdown();
+ auto deadline = std::chrono::system_clock::now() +
+ std::chrono::seconds(10);
+ server_->Shutdown(deadline);
for (auto ss = shutdown_state_.begin(); ss != shutdown_state_.end(); ++ss) {
(*ss)->set_shutdown();
}