Wrap ParseCommandLineFlags in InitTest
diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc
index f2271d9..ee9f275 100644
--- a/test/cpp/util/grpc_cli.cc
+++ b/test/cpp/util/grpc_cli.cc
@@ -63,6 +63,7 @@
#include <gflags/gflags.h>
#include "test/cpp/util/cli_call.h"
+#include "test/cpp/util/test_config.h"
#include <grpc++/channel_arguments.h>
#include <grpc++/channel_interface.h>
#include <grpc++/create_channel.h>
@@ -70,13 +71,6 @@
#include <grpc/grpc.h>
-// 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;
-
DEFINE_bool(enable_ssl, true, "Whether to use ssl/tls.");
DEFINE_bool(use_auth, false, "Whether to create default google credentials.");
DEFINE_string(input_binary_file, "",
@@ -87,7 +81,7 @@
int main(int argc, char** argv) {
grpc_init();
- ParseCommandLineFlags(&argc, &argv, true);
+ grpc::testing::InitTest(&argc, &argv, true);
if (argc < 4 || grpc::string(argv[1]) != "call") {
std::cout << "Usage: grpc_cli call server_host:port full_method_string\n"