diff options
author | Yuchen Zeng <zyc@google.com> | 2016-09-16 15:42:57 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2017-01-30 14:31:24 -0800 |
commit | 8d2d70ca99451623ec48175671a81f9927000983 (patch) | |
tree | 1e3968a107f695bb9990c13106309dbea908bd21 /test/cpp/util/proto_file_parser.cc | |
parent | d37f642f359cb7fd7405831e675abb93fd4704e2 (diff) |
Support bidirectional stream RPC
Add bidistream test
Add bad request tests
Replace deprecated DynamicMessageFactory constructor
Diffstat (limited to 'test/cpp/util/proto_file_parser.cc')
-rw-r--r-- | test/cpp/util/proto_file_parser.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc index 9f1f05595e..d501c3697b 100644 --- a/test/cpp/util/proto_file_parser.cc +++ b/test/cpp/util/proto_file_parser.cc @@ -81,8 +81,9 @@ class ErrorPrinter : public protobuf::compiler::MultiFileErrorCollector { ProtoFileParser::ProtoFileParser(std::shared_ptr<grpc::Channel> channel, const grpc::string& proto_path, const grpc::string& protofiles) - : has_error_(false) { - std::vector<grpc::string> service_list; + : has_error_(false), + dynamic_factory_(new protobuf::DynamicMessageFactory()) { + std::vector<std::string> service_list; if (channel) { reflection_db_.reset(new grpc::ProtoReflectionDescriptorDatabase(channel)); reflection_db_->GetServices(&service_list); @@ -127,7 +128,6 @@ ProtoFileParser::ProtoFileParser(std::shared_ptr<grpc::Channel> channel, } desc_pool_.reset(new protobuf::DescriptorPool(desc_db_.get())); - dynamic_factory_.reset(new protobuf::DynamicMessageFactory(desc_pool_.get())); for (auto it = service_list.begin(); it != service_list.end(); it++) { if (known_services.find(*it) == known_services.end()) { |