aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <y-zeng@users.noreply.github.com>2016-10-05 13:39:02 -0700
committerGravatar GitHub <noreply@github.com>2016-10-05 13:39:02 -0700
commita2e50c5b85b4c0d4d7a5f9624eb40856198ef508 (patch)
treede2775003729a50fe795b18fb8920e1211400528
parent998dbc0492a1c95cc895a3a8f723faaf815942e4 (diff)
parentd7c8c2bf947d620f257a00e1ce5c37aab3d50951 (diff)
Merge pull request #8190 from y-zeng/proto_db
Improve ProtoReflectionDescriptorDatabase
-rw-r--r--build.yaml1
-rw-r--r--test/cpp/util/grpc_tool.cc1
-rw-r--r--test/cpp/util/proto_reflection_descriptor_database.cc9
-rw-r--r--test/cpp/util/proto_reflection_descriptor_database.h2
-rw-r--r--tools/run_tests/sources_and_headers.json3
-rw-r--r--vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj3
6 files changed, 8 insertions, 11 deletions
diff --git a/build.yaml b/build.yaml
index 7a70f0dabe..584084ff86 100644
--- a/build.yaml
+++ b/build.yaml
@@ -1097,7 +1097,6 @@ libs:
deps:
- grpc++_reflection
- grpc++
- - grpc++_test_config
- name: grpc_plugin_support
build: protoc
language: c++
diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc
index 8fb325cf76..03c33abe9f 100644
--- a/test/cpp/util/grpc_tool.cc
+++ b/test/cpp/util/grpc_tool.cc
@@ -52,7 +52,6 @@
#include "test/cpp/util/proto_file_parser.h"
#include "test/cpp/util/proto_reflection_descriptor_database.h"
#include "test/cpp/util/service_describer.h"
-#include "test/cpp/util/test_config.h"
namespace grpc {
namespace testing {
diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc
index b60f447e37..54790be496 100644
--- a/test/cpp/util/proto_reflection_descriptor_database.cc
+++ b/test/cpp/util/proto_reflection_descriptor_database.cc
@@ -314,13 +314,16 @@ ProtoReflectionDescriptorDatabase::GetStream() {
return stream_;
}
-void ProtoReflectionDescriptorDatabase::DoOneRequest(
+bool ProtoReflectionDescriptorDatabase::DoOneRequest(
const ServerReflectionRequest& request,
ServerReflectionResponse& response) {
+ bool success = false;
stream_mutex_.lock();
- GetStream()->Write(request);
- GetStream()->Read(&response);
+ if (GetStream()->Write(request) && GetStream()->Read(&response)) {
+ success = true;
+ }
stream_mutex_.unlock();
+ return success;
}
} // namespace grpc
diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h
index 471c9618da..dfa36044d9 100644
--- a/test/cpp/util/proto_reflection_descriptor_database.h
+++ b/test/cpp/util/proto_reflection_descriptor_database.h
@@ -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);
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index ae5a9382c0..c05d194e19 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -5010,8 +5010,7 @@
{
"deps": [
"grpc++",
- "grpc++_reflection",
- "grpc++_test_config"
+ "grpc++_reflection"
],
"headers": [
"test/cpp/util/cli_call.h",
diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj
index 2790884ee1..4c61baa506 100644
--- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj
+++ b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj
@@ -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">