aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps/worker.cc')
-rw-r--r--test/cpp/qps/worker.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc
index 1ef5313b66..281c617382 100644
--- a/test/cpp/qps/worker.cc
+++ b/test/cpp/qps/worker.cc
@@ -40,17 +40,11 @@
#include <gflags/gflags.h>
#include "qps_worker.h"
+#include "test/cpp/util/test_config.h"
DEFINE_int32(driver_port, 0, "Driver server port.");
DEFINE_int32(server_port, 0, "Spawned server port.");
-// In some distros, gflags is in the namespace google, and in some others,
-// in gflags. This hack is enabling us to find both.
-namespace google {}
-namespace gflags {}
-using namespace google;
-using namespace gflags;
-
static bool got_sigint = false;
static void sigint_handler(int x) {got_sigint = true;}
@@ -70,13 +64,11 @@ static void RunServer() {
} // namespace grpc
int main(int argc, char** argv) {
- grpc_init();
- ParseCommandLineFlags(&argc, &argv, true);
+ grpc::testing::InitTest(&argc, &argv, true);
signal(SIGINT, sigint_handler);
grpc::testing::RunServer();
-
- grpc_shutdown();
+
return 0;
}