Enable channelz for xds_interop_client and xds_interop_server (#25939)

* Enable channelz for xds_interop_client and xds_interop_server

* Regenerate projects
reviewable/pr25969/r1
Yash Tibrewal 4 years ago committed by GitHub
parent 8028cc874d
commit 23152e74ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CMakeLists.txt
  2. 4
      build_autogenerated.yaml
  3. 2
      test/cpp/interop/BUILD
  4. 2
      test/cpp/interop/xds_interop_client.cc
  5. 3
      test/cpp/interop/xds_interop_server.cc

@ -14926,7 +14926,7 @@ target_link_libraries(xds_interop_client
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
absl::flags
grpc++
grpcpp_channelz
grpc_test_util
grpc++_test_config
)
@ -14981,7 +14981,7 @@ target_link_libraries(xds_interop_server
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
absl::flags
grpc++
grpcpp_channelz
grpc_test_util
grpc++_test_config
)

@ -6674,7 +6674,7 @@ targets:
- test/cpp/interop/xds_interop_client.cc
deps:
- absl/flags:flag
- grpc++
- grpcpp_channelz
- grpc_test_util
- grpc++_test_config
- name: xds_interop_server
@ -6692,7 +6692,7 @@ targets:
- test/cpp/interop/xds_interop_server.cc
deps:
- absl/flags:flag
- grpc++
- grpcpp_channelz
- grpc_test_util
- grpc++_test_config
tests: []

@ -229,6 +229,7 @@ grpc_cc_binary(
],
deps = [
"//:grpc++",
"//:grpcpp_channelz",
"//src/proto/grpc/testing:empty_proto",
"//src/proto/grpc/testing:messages_proto",
"//src/proto/grpc/testing:test_proto",
@ -248,6 +249,7 @@ grpc_cc_binary(
],
deps = [
"//:grpc++",
"//:grpcpp_channelz",
"//src/proto/grpc/testing:empty_proto",
"//src/proto/grpc/testing:messages_proto",
"//src/proto/grpc/testing:test_proto",

@ -16,6 +16,7 @@
*
*/
#include <grpcpp/ext/channelz_service_plugin.h>
#include <grpcpp/grpcpp.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
@ -574,6 +575,7 @@ void BuildRpcConfigsFromFlags(RpcConfigurationsQueue* rpc_configs_queue) {
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
grpc::testing::InitTest(&argc, &argv, true);
grpc::channelz::experimental::InitChannelzService();
// Validate the expect_status flag.
grpc_status_code code;
GPR_ASSERT(grpc_status_code_from_string(

@ -19,6 +19,7 @@
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpcpp/ext/channelz_service_plugin.h>
#include <grpcpp/health_check_service_interface.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
@ -155,7 +156,7 @@ void RunServer(bool secure_mode, const int port, const int maintenance_port,
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
grpc::testing::InitTest(&argc, &argv, true);
grpc::channelz::experimental::InitChannelzService();
char* hostname = grpc_gethostname();
if (hostname == nullptr) {
std::cout << "Failed to get hostname, terminating" << std::endl;

Loading…
Cancel
Save