diff options
author | 2015-04-15 15:23:54 -0700 | |
---|---|---|
committer | 2015-04-15 15:23:54 -0700 | |
commit | 103837ee6bcfd05f0cd17b8f742d582a6082216d (patch) | |
tree | 7b3b429b8599e53d477643a189ac241b65f4fb38 /examples/pubsub/main.cc | |
parent | 0afc3addf4b438d32ab9a7424c0ae588a1c8e212 (diff) |
Wrap ParseCommandLineFlags in InitTest
Diffstat (limited to 'examples/pubsub/main.cc')
-rw-r--r-- | examples/pubsub/main.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/pubsub/main.cc b/examples/pubsub/main.cc index cc5076f0a5..8f8eefa9ef 100644 --- a/examples/pubsub/main.cc +++ b/examples/pubsub/main.cc @@ -46,6 +46,7 @@ #include <grpc++/create_channel.h> #include <grpc++/credentials.h> #include <grpc++/status.h> +#include "test/cpp/util/test_config.h" #include "examples/pubsub/publisher.h" #include "examples/pubsub/subscriber.h" @@ -55,13 +56,6 @@ DEFINE_string(server_host, "pubsub-staging.googleapis.com", "Server host to connect to"); DEFINE_string(project_id, "", "GCE project id such as stoked-keyword-656"); -// 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; - namespace { const char kTopic[] = "testtopics"; @@ -72,7 +66,7 @@ const char kMessageData[] = "Test Data"; int main(int argc, char** argv) { grpc_init(); - ParseCommandLineFlags(&argc, &argv, true); + grpc::testing::InitTest(&argc, &argv, true); gpr_log(GPR_INFO, "Start PUBSUB client"); std::ostringstream ss; |