Improve ProtoReflectionDescriptorDatabase

pull/8190/head
Yuchen Zeng 8 years ago
parent 942c264861
commit 27170357ab
  1. 1
      build.yaml
  2. 9
      test/cpp/util/proto_reflection_descriptor_database.cc
  3. 2
      test/cpp/util/proto_reflection_descriptor_database.h
  4. 3
      tools/run_tests/sources_and_headers.json
  5. 3
      vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj

@ -1094,7 +1094,6 @@ libs:
deps:
- grpc++_reflection
- grpc++
- grpc++_test_config
- name: grpc_plugin_support
build: protoc
language: c++

@ -314,13 +314,16 @@ ProtoReflectionDescriptorDatabase::GetStream() {
return stream_;
}
void ProtoReflectionDescriptorDatabase::DoOneRequest(
bool ProtoReflectionDescriptorDatabase::DoOneRequest(
const ServerReflectionRequest& request,
ServerReflectionResponse& response) {
bool request_succeed = false;
stream_mutex_.lock();
GetStream()->Write(request);
GetStream()->Read(&response);
if (GetStream()->Write(request) && GetStream()->Read(&response)) {
request_succeed = true;
}
stream_mutex_.unlock();
return request_succeed;
}
} // namespace grpc

@ -111,7 +111,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
const std::shared_ptr<ClientStream> GetStream();
void DoOneRequest(
bool DoOneRequest(
const grpc::reflection::v1alpha::ServerReflectionRequest& request,
grpc::reflection::v1alpha::ServerReflectionResponse& response);

@ -4693,8 +4693,7 @@
{
"deps": [
"grpc++",
"grpc++_reflection",
"grpc++_test_config"
"grpc++_reflection"
],
"headers": [
"test/cpp/util/cli_call.h",

@ -176,9 +176,6 @@
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
<Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_test_config\grpc++_test_config.vcxproj">
<Project>{3F7D093D-11F9-C4BC-BEB7-18EB28E3F290}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

Loading…
Cancel
Save