diff options
author | ncteisen <ncteisen@gmail.com> | 2018-10-14 19:50:52 -0400 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2018-10-14 19:50:52 -0400 |
commit | 636393d719600d7c242574c412b369e396bdeaee (patch) | |
tree | 018693a1cdf120dbe2970ea844fba34124be63d9 /test/core/channel/channelz_test.cc | |
parent | 10f995d283607a161e2ddcae5dd94636de950ec5 (diff) |
reviewer feedback
Diffstat (limited to 'test/core/channel/channelz_test.cc')
-rw-r--r-- | test/core/channel/channelz_test.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/test/core/channel/channelz_test.cc b/test/core/channel/channelz_test.cc index b7cdde581a..057d53b4ab 100644 --- a/test/core/channel/channelz_test.cc +++ b/test/core/channel/channelz_test.cc @@ -126,12 +126,12 @@ void ValidateGetServers(size_t expected_servers) { class ChannelFixture { public: ChannelFixture(int max_tracer_event_memory = 0) { - grpc_arg client_a[2]; - client_a[0] = grpc_channel_arg_integer_create( - const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE), - max_tracer_event_memory); - client_a[1] = grpc_channel_arg_integer_create( - const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), true); + grpc_arg client_a[] = { + grpc_channel_arg_integer_create( + const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE), + max_tracer_event_memory), + grpc_channel_arg_integer_create( + const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), true)}; grpc_channel_args client_args = {GPR_ARRAY_SIZE(client_a), client_a}; channel_ = grpc_insecure_channel_create("fake_target", &client_args, nullptr); @@ -239,11 +239,12 @@ TEST_P(ChannelzChannelTest, BasicChannel) { TEST(ChannelzChannelTest, ChannelzDisabled) { grpc_core::ExecCtx exec_ctx; // explicitly disable channelz - grpc_arg arg[2]; - arg[0] = grpc_channel_arg_integer_create( - const_cast<char*>(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE), 0); - arg[1] = grpc_channel_arg_integer_create( - const_cast<char*>(GRPC_ARG_ENABLE_CHANNELZ), false); + 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}; grpc_channel* channel = grpc_insecure_channel_create("fake_target", &args, nullptr); |