diff options
author | yang-g <yangg@google.com> | 2017-06-19 16:33:04 -0700 |
---|---|---|
committer | yang-g <yangg@google.com> | 2017-06-19 17:01:30 -0700 |
commit | 32e16783271778aa4d65f96222f0c782011a2989 (patch) | |
tree | e238d82ad2432b7173dd9c4c70c680780a4f268f /test/cpp | |
parent | 8399f92fd644c263df041d3809380944276f4274 (diff) |
Still create channel if remotedb is false. Just do not use it in the file parsing
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/util/grpc_tool.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc index af0afa9b55..bb6f878020 100644 --- a/test/cpp/util/grpc_tool.cc +++ b/test/cpp/util/grpc_tool.cc @@ -445,12 +445,10 @@ bool GrpcTool::CallMethod(int argc, const char** argv, bool print_mode = false; std::shared_ptr<grpc::Channel> channel = - FLAGS_remotedb - ? grpc::CreateChannel(server_address, cred.GetCredentials()) - : nullptr; + grpc::CreateChannel(server_address, cred.GetCredentials()); - parser.reset(new grpc::testing::ProtoFileParser(channel, FLAGS_proto_path, - FLAGS_protofiles)); + parser.reset(new grpc::testing::ProtoFileParser( + FLAGS_remotedb ? channel : nullptr, FLAGS_proto_path, FLAGS_protofiles)); if (FLAGS_binary_input) { formatted_method_name = method_name; |