diff options
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/qps_driver.cc | 10 | ||||
-rw-r--r-- | test/cpp/qps/worker.cc | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 8959f7b97e..0669ccf808 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -36,6 +36,7 @@ #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" +#include "test/cpp/util/test_config.h" DEFINE_int32(num_clients, 1, "Number of client binaries"); DEFINE_int32(num_servers, 1, "Number of server binaries"); @@ -67,16 +68,9 @@ using grpc::testing::ServerType; using grpc::testing::RpcType; using grpc::testing::ResourceUsage; -// 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; - int main(int argc, char** argv) { grpc_init(); - ParseCommandLineFlags(&argc, &argv, true); + grpc::testing::InitTest(&argc, &argv, true); RpcType rpc_type; GPR_ASSERT(RpcType_Parse(FLAGS_rpc_type, &rpc_type)); diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index 1ef5313b66..896a85cc59 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;} @@ -71,7 +65,7 @@ static void RunServer() { int main(int argc, char** argv) { grpc_init(); - ParseCommandLineFlags(&argc, &argv, true); + grpc::testing::InitTest(&argc, &argv, true); signal(SIGINT, sigint_handler); |