From c3c6e064b33ab8b7a2d3cf5a56171029d0bb1edc Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 9 May 2018 11:10:21 -0700 Subject: Add basic support for GetChannel --- tools/run_tests/generated/tests.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tools/run_tests/generated/tests.json') diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 00604f181c..0a02b1df05 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -3693,6 +3693,30 @@ ], "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "channelz_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": true + }, { "args": [], "benchmark": false, -- cgit v1.2.3 From b8a52e0cf3e271f80b32f16783c76c065f5c2167 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Thu, 7 Jun 2018 18:58:03 -0700 Subject: Add new end2end test for channelz --- CMakeLists.txt | 2 + Makefile | 2 + gRPC-Core.podspec | 1 + grpc.gyp | 2 + src/core/lib/channel/channelz.cc | 12 +- test/core/channel/channelz_test.cc | 1 - test/core/end2end/end2end_nosec_tests.cc | 8 + test/core/end2end/end2end_tests.cc | 8 + test/core/end2end/gen_build_yaml.py | 1 + test/core/end2end/generate_tests.bzl | 1 + test/core/end2end/tests/channelz.cc | 263 ++++++ test/core/end2end/tests/simple_request.cc | 24 - tools/run_tests/generated/sources_and_headers.json | 2 + tools/run_tests/generated/tests.json | 927 +++++++++++++++++++-- 14 files changed, 1154 insertions(+), 100 deletions(-) create mode 100644 test/core/end2end/tests/channelz.cc (limited to 'tools/run_tests/generated/tests.json') diff --git a/CMakeLists.txt b/CMakeLists.txt index 29352da5f6..de3cb55fd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5281,6 +5281,7 @@ add_library(end2end_tests test/core/end2end/tests/cancel_before_invoke.cc test/core/end2end/tests/cancel_in_a_vacuum.cc test/core/end2end/tests/cancel_with_status.cc + test/core/end2end/tests/channelz.cc test/core/end2end/tests/compressed_payload.cc test/core/end2end/tests/connectivity.cc test/core/end2end/tests/default_host.cc @@ -5399,6 +5400,7 @@ add_library(end2end_nosec_tests test/core/end2end/tests/cancel_before_invoke.cc test/core/end2end/tests/cancel_in_a_vacuum.cc test/core/end2end/tests/cancel_with_status.cc + test/core/end2end/tests/channelz.cc test/core/end2end/tests/compressed_payload.cc test/core/end2end/tests/connectivity.cc test/core/end2end/tests/default_host.cc diff --git a/Makefile b/Makefile index 7d56686fe2..f68ea71df8 100644 --- a/Makefile +++ b/Makefile @@ -9979,6 +9979,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/cancel_before_invoke.cc \ test/core/end2end/tests/cancel_in_a_vacuum.cc \ test/core/end2end/tests/cancel_with_status.cc \ + test/core/end2end/tests/channelz.cc \ test/core/end2end/tests/compressed_payload.cc \ test/core/end2end/tests/connectivity.cc \ test/core/end2end/tests/default_host.cc \ @@ -10095,6 +10096,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/cancel_before_invoke.cc \ test/core/end2end/tests/cancel_in_a_vacuum.cc \ test/core/end2end/tests/cancel_with_status.cc \ + test/core/end2end/tests/channelz.cc \ test/core/end2end/tests/compressed_payload.cc \ test/core/end2end/tests/connectivity.cc \ test/core/end2end/tests/default_host.cc \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index a10cfb5739..2a9ad86f03 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1178,6 +1178,7 @@ Pod::Spec.new do |s| 'test/core/end2end/tests/cancel_before_invoke.cc', 'test/core/end2end/tests/cancel_in_a_vacuum.cc', 'test/core/end2end/tests/cancel_with_status.cc', + 'test/core/end2end/tests/channelz.cc', 'test/core/end2end/tests/compressed_payload.cc', 'test/core/end2end/tests/connectivity.cc', 'test/core/end2end/tests/default_host.cc', diff --git a/grpc.gyp b/grpc.gyp index a3ea8674fc..6f259b215a 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -2611,6 +2611,7 @@ 'test/core/end2end/tests/cancel_before_invoke.cc', 'test/core/end2end/tests/cancel_in_a_vacuum.cc', 'test/core/end2end/tests/cancel_with_status.cc', + 'test/core/end2end/tests/channelz.cc', 'test/core/end2end/tests/compressed_payload.cc', 'test/core/end2end/tests/connectivity.cc', 'test/core/end2end/tests/default_host.cc', @@ -2701,6 +2702,7 @@ 'test/core/end2end/tests/cancel_before_invoke.cc', 'test/core/end2end/tests/cancel_in_a_vacuum.cc', 'test/core/end2end/tests/cancel_with_status.cc', + 'test/core/end2end/tests/channelz.cc', 'test/core/end2end/tests/compressed_payload.cc', 'test/core/end2end/tests/connectivity.cc', 'test/core/end2end/tests/default_host.cc', diff --git a/src/core/lib/channel/channelz.cc b/src/core/lib/channel/channelz.cc index 1d2be00f1c..42b169dffd 100644 --- a/src/core/lib/channel/channelz.cc +++ b/src/core/lib/channel/channelz.cc @@ -164,12 +164,12 @@ char* Channel::RenderJSON() { json_iterator = nullptr; // We use -1 as sentinel values since proto default value for integers is // zero, and the confuses the parser into thinking the value weren't present - json_iterator = add_num_str(json, json_iterator, "callsStarted", - calls_started_); - json_iterator = add_num_str(json, json_iterator, "callsSucceeded", - calls_succeeded_); - json_iterator = add_num_str(json, json_iterator, "callsFailed", - calls_failed_); + json_iterator = + add_num_str(json, json_iterator, "callsStarted", calls_started_); + json_iterator = + add_num_str(json, json_iterator, "callsSucceeded", calls_succeeded_); + json_iterator = + add_num_str(json, json_iterator, "callsFailed", calls_failed_); gpr_timespec ts = grpc_millis_to_timespec(last_call_started_millis_, GPR_CLOCK_REALTIME); json_iterator = diff --git a/test/core/channel/channelz_test.cc b/test/core/channel/channelz_test.cc index df97d34fd0..262ca38ee0 100644 --- a/test/core/channel/channelz_test.cc +++ b/test/core/channel/channelz_test.cc @@ -116,7 +116,6 @@ void ValidateChannel(Channel* channel, validate_channel_data_args args) { grpc::testing::ValidateChannelProtoJsonTranslation(json_str); ValidateCounters(json_str, args); gpr_free(json_str); - } grpc_millis GetLastCallStartedMillis(Channel* channel) { diff --git a/test/core/end2end/end2end_nosec_tests.cc b/test/core/end2end/end2end_nosec_tests.cc index 59eb643a93..5ee0bb83fd 100644 --- a/test/core/end2end/end2end_nosec_tests.cc +++ b/test/core/end2end/end2end_nosec_tests.cc @@ -54,6 +54,8 @@ extern void cancel_in_a_vacuum(grpc_end2end_test_config config); extern void cancel_in_a_vacuum_pre_init(void); extern void cancel_with_status(grpc_end2end_test_config config); extern void cancel_with_status_pre_init(void); +extern void channelz(grpc_end2end_test_config config); +extern void channelz_pre_init(void); extern void compressed_payload(grpc_end2end_test_config config); extern void compressed_payload_pre_init(void); extern void connectivity(grpc_end2end_test_config config); @@ -199,6 +201,7 @@ void grpc_end2end_tests_pre_init(void) { cancel_before_invoke_pre_init(); cancel_in_a_vacuum_pre_init(); cancel_with_status_pre_init(); + channelz_pre_init(); compressed_payload_pre_init(); connectivity_pre_init(); default_host_pre_init(); @@ -284,6 +287,7 @@ void grpc_end2end_tests(int argc, char **argv, cancel_before_invoke(config); cancel_in_a_vacuum(config); cancel_with_status(config); + channelz(config); compressed_payload(config); connectivity(config); default_host(config); @@ -400,6 +404,10 @@ void grpc_end2end_tests(int argc, char **argv, cancel_with_status(config); continue; } + if (0 == strcmp("channelz", argv[i])) { + channelz(config); + continue; + } if (0 == strcmp("compressed_payload", argv[i])) { compressed_payload(config); continue; diff --git a/test/core/end2end/end2end_tests.cc b/test/core/end2end/end2end_tests.cc index 9f164b4ead..ca5c18bcc2 100644 --- a/test/core/end2end/end2end_tests.cc +++ b/test/core/end2end/end2end_tests.cc @@ -56,6 +56,8 @@ extern void cancel_in_a_vacuum(grpc_end2end_test_config config); extern void cancel_in_a_vacuum_pre_init(void); extern void cancel_with_status(grpc_end2end_test_config config); extern void cancel_with_status_pre_init(void); +extern void channelz(grpc_end2end_test_config config); +extern void channelz_pre_init(void); extern void compressed_payload(grpc_end2end_test_config config); extern void compressed_payload_pre_init(void); extern void connectivity(grpc_end2end_test_config config); @@ -202,6 +204,7 @@ void grpc_end2end_tests_pre_init(void) { cancel_before_invoke_pre_init(); cancel_in_a_vacuum_pre_init(); cancel_with_status_pre_init(); + channelz_pre_init(); compressed_payload_pre_init(); connectivity_pre_init(); default_host_pre_init(); @@ -288,6 +291,7 @@ void grpc_end2end_tests(int argc, char **argv, cancel_before_invoke(config); cancel_in_a_vacuum(config); cancel_with_status(config); + channelz(config); compressed_payload(config); connectivity(config); default_host(config); @@ -408,6 +412,10 @@ void grpc_end2end_tests(int argc, char **argv, cancel_with_status(config); continue; } + if (0 == strcmp("channelz", argv[i])) { + channelz(config); + continue; + } if (0 == strcmp("compressed_payload", argv[i])) { compressed_payload(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index c355fc24b5..53f4ab0d52 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -106,6 +106,7 @@ END2END_TESTS = { needs_compression=True), 'connectivity': connectivity_test_options._replace(needs_names=True, proxyable=False, cpu_cost=LOWCPU, exclude_iomgrs=['uv']), + 'channelz': default_test_options, 'default_host': default_test_options._replace( needs_fullstack=True, needs_dns=True, needs_names=True), 'call_host_override': default_test_options._replace( diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl index 11fc576165..94bc092b59 100755 --- a/test/core/end2end/generate_tests.bzl +++ b/test/core/end2end/generate_tests.bzl @@ -113,6 +113,7 @@ END2END_TESTS = { 'compressed_payload': test_options(proxyable=False, exclude_inproc=True), 'connectivity': test_options(needs_fullstack=True, needs_names=True, proxyable=False), + 'channelz': test_options(), 'default_host': test_options(needs_fullstack=True, needs_dns=True, needs_names=True), 'disappearing_server': test_options(needs_fullstack=True,needs_names=True), diff --git a/test/core/end2end/tests/channelz.cc b/test/core/end2end/tests/channelz.cc new file mode 100644 index 0000000000..95d6e3880d --- /dev/null +++ b/test/core/end2end/tests/channelz.cc @@ -0,0 +1,263 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include "src/core/lib/surface/channel.h" + +#include +#include +#include +#include +#include +#include "src/core/lib/gpr/string.h" +#include "test/core/end2end/cq_verifier.h" + +static void* tag(intptr_t t) { return (void*)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char* test_name, + grpc_channel_args* client_args, + grpc_channel_args* server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture* f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +static void end_test(grpc_end2end_test_fixture* f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +static void run_one_request(grpc_end2end_test_config config, + grpc_end2end_test_fixture f, + bool request_is_success) { + grpc_call* c; + grpc_call* s; + cq_verifier* cqv = cq_verifier_create(f.cq); + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/foo"), nullptr, + deadline, nullptr); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->data.recv_status_on_client.error_string = nullptr; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), 1); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = + request_is_success ? GRPC_STATUS_OK : GRPC_STATUS_UNIMPLEMENTED; + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + op->data.send_status_from_server.status_details = &status_details; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); + GPR_ASSERT(0 == call_details.flags); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); +} + +static void test_channelz(grpc_end2end_test_config config) { + grpc_end2end_test_fixture f; + + f = begin_test(config, "test_channelz", nullptr, nullptr); + grpc_core::channelz::Channel* channelz_channel = + grpc_channel_get_channelz_node(f.client); + + char* json = channelz_channel->RenderJSON(); + GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"0\"")); + GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"0\"")); + GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"0\"")); + gpr_free(json); + + // one successful request + run_one_request(config, f, true); + + json = channelz_channel->RenderJSON(); + GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"1\"")); + GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"0\"")); + GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"1\"")); + gpr_free(json); + + // one failed request + run_one_request(config, f, false); + + json = channelz_channel->RenderJSON(); + gpr_log(GPR_INFO, "%s", json); + GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"2\"")); + GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"1\"")); + GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"1\"")); + gpr_free(json); + + end_test(&f); + config.tear_down_data(&f); +} + +static void test_channelz_with_channel_trace(grpc_end2end_test_config config) { + grpc_end2end_test_fixture f; + + grpc_arg client_a; + client_a.type = GRPC_ARG_INTEGER; + client_a.key = const_cast(GRPC_ARG_MAX_CHANNEL_TRACE_EVENTS_PER_NODE); + client_a.value.integer = 5; + grpc_channel_args client_args = {1, &client_a}; + + f = begin_test(config, "test_channelz_with_channel_trace", &client_args, + nullptr); + grpc_core::channelz::Channel* channelz_channel = + grpc_channel_get_channelz_node(f.client); + + char* json = channelz_channel->RenderJSON(); + gpr_log(GPR_INFO, "%s", json); + GPR_ASSERT(nullptr != strstr(json, "\"trace\"")); + GPR_ASSERT(nullptr != strstr(json, "\"description\":\"Channel created\"")); + GPR_ASSERT(nullptr != strstr(json, "\"severity\":\"CT_INFO\"")); + gpr_free(json); + + end_test(&f); + config.tear_down_data(&f); +} +void channelz(grpc_end2end_test_config config) { + test_channelz(config); + test_channelz_with_channel_trace(config); +} + +void channelz_pre_init(void) {} diff --git a/test/core/end2end/tests/simple_request.cc b/test/core/end2end/tests/simple_request.cc index 8082bf93d5..941d9ae319 100644 --- a/test/core/end2end/tests/simple_request.cc +++ b/test/core/end2end/tests/simple_request.cc @@ -21,8 +21,6 @@ #include #include -#include "src/core/lib/surface/channel.h" - #include #include #include @@ -254,18 +252,6 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) { f = begin_test(config, "test_invoke_simple_request", nullptr, nullptr); simple_request_body(config, f); - - // The following is a quick sanity check on channelz functionality. It - // ensures that core properly tracked the one call that occurred in this - // simple end2end test. - grpc_core::channelz::Channel* channelz_channel = - grpc_channel_get_channelz_node(f.client); - char* json = channelz_channel->RenderJSON(); - GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"1\"")); - GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"1\"")); - GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"0\"")); - gpr_free(json); - end_test(&f); config.tear_down_data(&f); } @@ -278,16 +264,6 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) { simple_request_body(config, f); gpr_log(GPR_INFO, "Running test: Passed simple request %d", i); } - - // The following is a quick sanity check on channelz functionality. It - // ensures that core properly tracked the ten calls that occurred. - grpc_core::channelz::Channel* channelz_channel = - grpc_channel_get_channelz_node(f.client); - char* json = channelz_channel->RenderJSON(); - GPR_ASSERT(nullptr != strstr(json, "\"callsStarted\":\"10\"")); - GPR_ASSERT(nullptr != strstr(json, "\"callsFailed\":\"10\"")); - GPR_ASSERT(nullptr != strstr(json, "\"callsSucceeded\":\"0\"")); - gpr_free(json); end_test(&f); config.tear_down_data(&f); } diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index efe53d7da5..564f39b6ca 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -8744,6 +8744,7 @@ "test/core/end2end/tests/cancel_in_a_vacuum.cc", "test/core/end2end/tests/cancel_test_helpers.h", "test/core/end2end/tests/cancel_with_status.cc", + "test/core/end2end/tests/channelz.cc", "test/core/end2end/tests/compressed_payload.cc", "test/core/end2end/tests/connectivity.cc", "test/core/end2end/tests/default_host.cc", @@ -8843,6 +8844,7 @@ "test/core/end2end/tests/cancel_in_a_vacuum.cc", "test/core/end2end/tests/cancel_test_helpers.h", "test/core/end2end/tests/cancel_with_status.cc", + "test/core/end2end/tests/channelz.cc", "test/core/end2end/tests/compressed_payload.cc", "test/core/end2end/tests/connectivity.cc", "test/core/end2end/tests/default_host.cc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 0a02b1df05..83d4f32eb6 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -7287,6 +7287,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -9039,6 +9062,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -10755,6 +10801,28 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -12398,6 +12466,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -13640,6 +13731,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -15340,6 +15454,25 @@ "linux" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "compressed_payload" @@ -16836,6 +16969,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -18542,6 +18698,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -20307,6 +20486,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -22142,6 +22345,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -23909,7 +24135,7 @@ }, { "args": [ - "compressed_payload" + "channelz" ], "ci_platforms": [ "windows", @@ -23933,14 +24159,14 @@ }, { "args": [ - "connectivity" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -23957,14 +24183,14 @@ }, { "args": [ - "default_host" + "connectivity" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -23981,7 +24207,7 @@ }, { "args": [ - "disappearing_server" + "default_host" ], "ci_platforms": [ "windows", @@ -23993,30 +24219,6 @@ "exclude_iomgrs": [ "uv" ], - "flaky": true, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -24029,7 +24231,7 @@ }, { "args": [ - "filter_call_init_fails" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -24041,7 +24243,7 @@ "exclude_iomgrs": [ "uv" ], - "flaky": false, + "flaky": true, "language": "c", "name": "h2_oauth2_test", "platforms": [ @@ -24053,7 +24255,55 @@ }, { "args": [ - "filter_causes_close" + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -25707,6 +25957,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "default_host" @@ -26859,6 +27133,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -28107,6 +28405,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -29305,6 +29627,32 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -30644,6 +30992,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -32385,6 +32756,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "default_host" @@ -33549,6 +33944,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -35207,30 +35625,7 @@ }, { "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "inproc_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "filter_call_init_fails" + "channelz" ], "ci_platforms": [ "windows", @@ -35253,7 +35648,7 @@ }, { "args": [ - "filter_causes_close" + "empty_batch" ], "ci_platforms": [ "windows", @@ -35276,7 +35671,7 @@ }, { "args": [ - "filter_latency" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -35284,7 +35679,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -35299,7 +35694,7 @@ }, { "args": [ - "filter_status_code" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -35322,7 +35717,7 @@ }, { "args": [ - "high_initial_seqno" + "filter_latency" ], "ci_platforms": [ "windows", @@ -35345,7 +35740,7 @@ }, { "args": [ - "hpack_size" + "filter_status_code" ], "ci_platforms": [ "windows", @@ -35368,7 +35763,7 @@ }, { "args": [ - "idempotent_request" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -35376,7 +35771,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -35391,7 +35786,7 @@ }, { "args": [ - "invoke_large_request" + "hpack_size" ], "ci_platforms": [ "windows", @@ -35399,7 +35794,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -35414,7 +35809,7 @@ }, { "args": [ - "large_metadata" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -35437,7 +35832,53 @@ }, { "args": [ - "load_reporting_hook" + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -36194,6 +36635,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -37923,6 +38387,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -39583,6 +40070,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -40802,6 +41312,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -42483,6 +43016,25 @@ "linux" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "compressed_payload" @@ -43956,6 +44508,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -45639,6 +46214,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -47380,6 +47978,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -49192,6 +49814,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -50909,6 +51554,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "default_host" @@ -52037,6 +52706,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -53261,6 +53954,30 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -54433,6 +55150,32 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -55726,6 +56469,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "compressed_payload" @@ -57359,6 +58125,29 @@ "posix" ] }, + { + "args": [ + "channelz" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "inproc_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "empty_batch" -- cgit v1.2.3