aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@gmail.com>2018-10-15 17:12:10 -0400
committerGravatar GitHub <noreply@github.com>2018-10-15 17:12:10 -0400
commit302c89e047c5f812aec018854f2ea4c442ac42d1 (patch)
tree02801bfc2e7c60ce2494b5602bb5a643b7c5986a /test/core/end2end
parentfe431b4d8ad24c2fc9981f4b9fc28ab75020c410 (diff)
parent247b5b70c4d85ea23179d8e5231e7a98498e98ca (diff)
Merge pull request #16819 from ncteisen/channelz
Channelz Part 9: Enable by Default
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/tests/channelz.cc32
1 files changed, 22 insertions, 10 deletions
diff --git a/test/core/end2end/tests/channelz.cc b/test/core/end2end/tests/channelz.cc
index 41549190e3..a812994435 100644
--- a/test/core/end2end/tests/channelz.cc
+++ b/test/core/end2end/tests/channelz.cc
@@ -199,9 +199,13 @@ static void run_one_request(grpc_end2end_test_config config,
static void test_channelz(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
- grpc_arg arg = grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), true);
- grpc_channel_args args = {1, &arg};
+ grpc_arg arg[] = {
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE),
+ 0),
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), true)};
+ grpc_channel_args args = {GPR_ARRAY_SIZE(arg), arg};
f = begin_test(config, "test_channelz", &args, &args);
grpc_core::channelz::ChannelNode* channelz_channel =
@@ -267,12 +271,12 @@ static void test_channelz(grpc_end2end_test_config config) {
static void test_channelz_with_channel_trace(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
- grpc_arg arg[2];
- arg[0] = grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE),
- 1024 * 1024);
- arg[1] = grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), true);
+ grpc_arg arg[] = {
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE),
+ 1024 * 1024),
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), true)};
grpc_channel_args args = {GPR_ARRAY_SIZE(arg), arg};
f = begin_test(config, "test_channelz_with_channel_trace", &args, &args);
@@ -307,7 +311,15 @@ static void test_channelz_with_channel_trace(grpc_end2end_test_config config) {
static void test_channelz_disabled(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
- f = begin_test(config, "test_channelz_disabled", nullptr, nullptr);
+ grpc_arg arg[] = {
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE),
+ 0),
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), false)};
+ grpc_channel_args args = {GPR_ARRAY_SIZE(arg), arg};
+
+ f = begin_test(config, "test_channelz_disabled", &args, &args);
grpc_core::channelz::ChannelNode* channelz_channel =
grpc_channel_get_channelz_node(f.client);
GPR_ASSERT(channelz_channel == nullptr);