aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cpp/end2end/BUILD1
-rw-r--r--test/cpp/end2end/client_callback_end2end_test.cc78
-rw-r--r--test/cpp/end2end/client_interceptors_end2end_test.cc1
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc48
-rw-r--r--test/cpp/end2end/server_interceptors_end2end_test.cc29
-rw-r--r--test/cpp/end2end/test_service_impl.cc41
-rw-r--r--test/cpp/end2end/test_service_impl.h11
-rw-r--r--test/cpp/microbenchmarks/BUILD60
-rw-r--r--test/cpp/microbenchmarks/bm_call_create.cc2
-rw-r--r--test/cpp/util/BUILD2
-rw-r--r--test/cpp/util/grpc_tool_test.cc3
11 files changed, 217 insertions, 59 deletions
diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD
index 4e3d841db0..446804401a 100644
--- a/test/cpp/end2end/BUILD
+++ b/test/cpp/end2end/BUILD
@@ -124,6 +124,7 @@ grpc_cc_test(
"//:grpc",
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
+ "//src/proto/grpc/testing:simple_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc
index d123d32644..a999321992 100644
--- a/test/cpp/end2end/client_callback_end2end_test.cc
+++ b/test/cpp/end2end/client_callback_end2end_test.cc
@@ -182,7 +182,7 @@ class ClientCallbackEnd2endTest
}
}
- void SendGenericEchoAsBidi(int num_rpcs) {
+ void SendGenericEchoAsBidi(int num_rpcs, int reuses) {
const grpc::string kMethodName("/grpc.testing.EchoTestService/Echo");
grpc::string test_string("");
for (int i = 0; i < num_rpcs; i++) {
@@ -191,14 +191,26 @@ class ClientCallbackEnd2endTest
ByteBuffer> {
public:
Client(ClientCallbackEnd2endTest* test, const grpc::string& method_name,
- const grpc::string& test_str) {
- test->generic_stub_->experimental().PrepareBidiStreamingCall(
- &cli_ctx_, method_name, this);
- request_.set_message(test_str);
- send_buf_ = SerializeToByteBuffer(&request_);
- StartWrite(send_buf_.get());
- StartRead(&recv_buf_);
- StartCall();
+ const grpc::string& test_str, int reuses)
+ : reuses_remaining_(reuses) {
+ activate_ = [this, test, method_name, test_str] {
+ if (reuses_remaining_ > 0) {
+ cli_ctx_.reset(new ClientContext);
+ reuses_remaining_--;
+ test->generic_stub_->experimental().PrepareBidiStreamingCall(
+ cli_ctx_.get(), method_name, this);
+ request_.set_message(test_str);
+ send_buf_ = SerializeToByteBuffer(&request_);
+ StartWrite(send_buf_.get());
+ StartRead(&recv_buf_);
+ StartCall();
+ } else {
+ std::unique_lock<std::mutex> l(mu_);
+ done_ = true;
+ cv_.notify_one();
+ }
+ };
+ activate_();
}
void OnWriteDone(bool ok) override { StartWritesDone(); }
void OnReadDone(bool ok) override {
@@ -208,9 +220,7 @@ class ClientCallbackEnd2endTest
};
void OnDone(const Status& s) override {
EXPECT_TRUE(s.ok());
- std::unique_lock<std::mutex> l(mu_);
- done_ = true;
- cv_.notify_one();
+ activate_();
}
void Await() {
std::unique_lock<std::mutex> l(mu_);
@@ -222,11 +232,13 @@ class ClientCallbackEnd2endTest
EchoRequest request_;
std::unique_ptr<ByteBuffer> send_buf_;
ByteBuffer recv_buf_;
- ClientContext cli_ctx_;
+ std::unique_ptr<ClientContext> cli_ctx_;
+ int reuses_remaining_;
+ std::function<void()> activate_;
std::mutex mu_;
std::condition_variable cv_;
bool done_ = false;
- } rpc{this, kMethodName, test_string};
+ } rpc{this, kMethodName, test_string, reuses};
rpc.Await();
}
@@ -250,6 +262,37 @@ TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) {
SendRpcs(10, false);
}
+TEST_P(ClientCallbackEnd2endTest, SendClientInitialMetadata) {
+ ResetStub();
+ SimpleRequest request;
+ SimpleResponse response;
+ ClientContext cli_ctx;
+
+ cli_ctx.AddMetadata(kCheckClientInitialMetadataKey,
+ kCheckClientInitialMetadataVal);
+
+ std::mutex mu;
+ std::condition_variable cv;
+ bool done = false;
+ stub_->experimental_async()->CheckClientInitialMetadata(
+ &cli_ctx, &request, &response, [&done, &mu, &cv](Status s) {
+ GPR_ASSERT(s.ok());
+
+ std::lock_guard<std::mutex> l(mu);
+ done = true;
+ cv.notify_one();
+ });
+ std::unique_lock<std::mutex> l(mu);
+ while (!done) {
+ cv.wait(l);
+ }
+}
+
+TEST_P(ClientCallbackEnd2endTest, SimpleRpcWithBinaryMetadata) {
+ ResetStub();
+ SendRpcs(1, true);
+}
+
TEST_P(ClientCallbackEnd2endTest, SequentialRpcsWithVariedBinaryMetadataValue) {
ResetStub();
SendRpcs(10, true);
@@ -262,7 +305,12 @@ TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcs) {
TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcsAsBidi) {
ResetStub();
- SendGenericEchoAsBidi(10);
+ SendGenericEchoAsBidi(10, 1);
+}
+
+TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcsAsBidiWithReactorReuse) {
+ ResetStub();
+ SendGenericEchoAsBidi(10, 10);
}
#if GRPC_ALLOW_EXCEPTIONS
diff --git a/test/cpp/end2end/client_interceptors_end2end_test.cc b/test/cpp/end2end/client_interceptors_end2end_test.cc
index 3a191d1e03..f55ece1c2b 100644
--- a/test/cpp/end2end/client_interceptors_end2end_test.cc
+++ b/test/cpp/end2end/client_interceptors_end2end_test.cc
@@ -50,6 +50,7 @@ class HijackingInterceptor : public experimental::Interceptor {
info_ = info;
// Make sure it is the right method
EXPECT_EQ(strcmp("/grpc.testing.EchoTestService/Echo", info->method()), 0);
+ EXPECT_EQ(info->type(), experimental::ClientRpcInfo::Type::UNARY);
}
virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc
index 40b657f105..1dfa91a76c 100644
--- a/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/test/cpp/end2end/client_lb_end2end_test.cc
@@ -116,7 +116,10 @@ class MyTestServiceImpl : public TestServiceImpl {
class ClientLbEnd2endTest : public ::testing::Test {
protected:
ClientLbEnd2endTest()
- : server_host_("localhost"), kRequestMessage_("Live long and prosper.") {
+ : server_host_("localhost"),
+ kRequestMessage_("Live long and prosper."),
+ creds_(new SecureChannelCredentials(
+ grpc_fake_transport_security_credentials_create())) {
// Make the backup poller poll very frequently in order to pick up
// updates from all the subchannels's FDs.
gpr_setenv("GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS", "1");
@@ -215,9 +218,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
} // else, default to pick first
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
response_generator_.get());
- std::shared_ptr<ChannelCredentials> creds(new SecureChannelCredentials(
- grpc_fake_transport_security_credentials_create()));
- return CreateCustomChannel("fake:///", std::move(creds), args);
+ return CreateCustomChannel("fake:///", creds_, args);
}
bool SendRpc(
@@ -265,6 +266,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
MyTestServiceImpl service_;
std::unique_ptr<std::thread> thread_;
bool server_ready_ = false;
+ bool started_ = false;
explicit ServerData(int port = 0) {
port_ = port > 0 ? port : grpc_pick_unused_port_or_die();
@@ -272,6 +274,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
void Start(const grpc::string& server_host) {
gpr_log(GPR_INFO, "starting server on port %d", port_);
+ started_ = true;
std::mutex mu;
std::unique_lock<std::mutex> lock(mu);
std::condition_variable cond;
@@ -297,9 +300,11 @@ class ClientLbEnd2endTest : public ::testing::Test {
cond->notify_one();
}
- void Shutdown(bool join = true) {
+ void Shutdown() {
+ if (!started_) return;
server_->Shutdown(grpc_timeout_milliseconds_to_deadline(0));
- if (join) thread_->join();
+ thread_->join();
+ started_ = false;
}
void SetServingStatus(const grpc::string& service, bool serving) {
@@ -378,6 +383,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
grpc_core::RefCountedPtr<grpc_core::FakeResolverResponseGenerator>
response_generator_;
const grpc::string kRequestMessage_;
+ std::shared_ptr<ChannelCredentials> creds_;
};
TEST_F(ClientLbEnd2endTest, PickFirst) {
@@ -422,6 +428,30 @@ TEST_F(ClientLbEnd2endTest, PickFirstProcessPending) {
CheckRpcSendOk(second_stub, DEBUG_LOCATION);
}
+TEST_F(ClientLbEnd2endTest, PickFirstSelectsReadyAtStartup) {
+ ChannelArguments args;
+ constexpr int kInitialBackOffMs = 5000;
+ args.SetInt(GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS, kInitialBackOffMs);
+ // Create 2 servers, but start only the second one.
+ std::vector<int> ports = {grpc_pick_unused_port_or_die(),
+ grpc_pick_unused_port_or_die()};
+ CreateServers(2, ports);
+ StartServer(1);
+ auto channel1 = BuildChannel("pick_first", args);
+ auto stub1 = BuildStub(channel1);
+ SetNextResolution(ports);
+ // Wait for second server to be ready.
+ WaitForServer(stub1, 1, DEBUG_LOCATION);
+ // Create a second channel with the same addresses. Its PF instance
+ // should immediately pick the second subchannel, since it's already
+ // in READY state.
+ auto channel2 = BuildChannel("pick_first", args);
+ SetNextResolution(ports);
+ // Check that the channel reports READY without waiting for the
+ // initial backoff.
+ EXPECT_TRUE(WaitForChannelReady(channel2.get(), 1 /* timeout_seconds */));
+}
+
TEST_F(ClientLbEnd2endTest, PickFirstBackOffInitialReconnect) {
ChannelArguments args;
constexpr int kInitialBackOffMs = 100;
@@ -944,7 +974,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinUpdateInError) {
servers_[0]->service_.ResetCounters();
// Shutdown one of the servers to be sent in the update.
- servers_[1]->Shutdown(false);
+ servers_[1]->Shutdown();
ports.emplace_back(servers_[1]->port_);
ports.emplace_back(servers_[2]->port_);
SetNextResolution(ports);
@@ -1003,7 +1033,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinReresolve) {
// Kill all servers
gpr_log(GPR_INFO, "****** ABOUT TO KILL SERVERS *******");
for (size_t i = 0; i < servers_.size(); ++i) {
- servers_[i]->Shutdown(true);
+ servers_[i]->Shutdown();
}
gpr_log(GPR_INFO, "****** SERVERS KILLED *******");
gpr_log(GPR_INFO, "****** SENDING DOOMED REQUESTS *******");
@@ -1051,7 +1081,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinSingleReconnect) {
}
const auto pre_death = servers_[0]->service_.request_count();
// Kill the first server.
- servers_[0]->Shutdown(true);
+ servers_[0]->Shutdown();
// Client request still succeed. May need retrying if RR had returned a pick
// before noticing the change in the server's connectivity.
while (!SendRpc(stub)) {
diff --git a/test/cpp/end2end/server_interceptors_end2end_test.cc b/test/cpp/end2end/server_interceptors_end2end_test.cc
index c98b6143c6..9460a7d6c6 100644
--- a/test/cpp/end2end/server_interceptors_end2end_test.cc
+++ b/test/cpp/end2end/server_interceptors_end2end_test.cc
@@ -44,7 +44,34 @@ namespace {
class LoggingInterceptor : public experimental::Interceptor {
public:
- LoggingInterceptor(experimental::ServerRpcInfo* info) { info_ = info; }
+ LoggingInterceptor(experimental::ServerRpcInfo* info) {
+ info_ = info;
+
+ // Check the method name and compare to the type
+ const char* method = info->method();
+ experimental::ServerRpcInfo::Type type = info->type();
+
+ // Check that we use one of our standard methods with expected type.
+ // Also allow the health checking service.
+ // We accept BIDI_STREAMING for Echo in case it's an AsyncGenericService
+ // being tested (the GenericRpc test).
+ // The empty method is for the Unimplemented requests that arise
+ // when draining the CQ.
+ EXPECT_TRUE(
+ strstr(method, "/grpc.health") == method ||
+ (strcmp(method, "/grpc.testing.EchoTestService/Echo") == 0 &&
+ (type == experimental::ServerRpcInfo::Type::UNARY ||
+ type == experimental::ServerRpcInfo::Type::BIDI_STREAMING)) ||
+ (strcmp(method, "/grpc.testing.EchoTestService/RequestStream") == 0 &&
+ type == experimental::ServerRpcInfo::Type::CLIENT_STREAMING) ||
+ (strcmp(method, "/grpc.testing.EchoTestService/ResponseStream") == 0 &&
+ type == experimental::ServerRpcInfo::Type::SERVER_STREAMING) ||
+ (strcmp(method, "/grpc.testing.EchoTestService/BidiStream") == 0 &&
+ type == experimental::ServerRpcInfo::Type::BIDI_STREAMING) ||
+ strcmp(method, "/grpc.testing.EchoTestService/Unimplemented") == 0 ||
+ (strcmp(method, "") == 0 &&
+ type == experimental::ServerRpcInfo::Type::BIDI_STREAMING));
+ }
virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
if (methods->QueryInterceptionHookPoint(
diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc
index 9d9c01cade..6729ad14f4 100644
--- a/test/cpp/end2end/test_service_impl.cc
+++ b/test/cpp/end2end/test_service_impl.cc
@@ -69,6 +69,22 @@ void CheckServerAuthContext(
EXPECT_EQ(expected_client_identity, identity[0]);
}
}
+
+// Returns the number of pairs in metadata that exactly match the given
+// key-value pair. Returns -1 if the pair wasn't found.
+int MetadataMatchCount(
+ const std::multimap<grpc::string_ref, grpc::string_ref>& metadata,
+ const grpc::string& key, const grpc::string& value) {
+ int count = 0;
+ for (std::multimap<grpc::string_ref, grpc::string_ref>::const_iterator iter =
+ metadata.begin();
+ iter != metadata.end(); ++iter) {
+ if (ToString(iter->first) == key && ToString(iter->second) == value) {
+ count++;
+ }
+ }
+ return count;
+}
} // namespace
namespace {
@@ -205,6 +221,18 @@ Status TestServiceImpl::Echo(ServerContext* context, const EchoRequest* request,
return Status::OK;
}
+Status TestServiceImpl::CheckClientInitialMetadata(ServerContext* context,
+ const SimpleRequest* request,
+ SimpleResponse* response) {
+ EXPECT_EQ(MetadataMatchCount(context->client_metadata(),
+ kCheckClientInitialMetadataKey,
+ kCheckClientInitialMetadataVal),
+ 1);
+ EXPECT_EQ(1u,
+ context->client_metadata().count(kCheckClientInitialMetadataKey));
+ return Status::OK;
+}
+
void CallbackTestServiceImpl::Echo(
ServerContext* context, const EchoRequest* request, EchoResponse* response,
experimental::ServerCallbackRpcController* controller) {
@@ -223,6 +251,19 @@ void CallbackTestServiceImpl::Echo(
}
}
+void CallbackTestServiceImpl::CheckClientInitialMetadata(
+ ServerContext* context, const SimpleRequest* request,
+ SimpleResponse* response,
+ experimental::ServerCallbackRpcController* controller) {
+ EXPECT_EQ(MetadataMatchCount(context->client_metadata(),
+ kCheckClientInitialMetadataKey,
+ kCheckClientInitialMetadataVal),
+ 1);
+ EXPECT_EQ(1u,
+ context->client_metadata().count(kCheckClientInitialMetadataKey));
+ controller->Finish(Status::OK);
+}
+
void CallbackTestServiceImpl::EchoNonDelayed(
ServerContext* context, const EchoRequest* request, EchoResponse* response,
experimental::ServerCallbackRpcController* controller) {
diff --git a/test/cpp/end2end/test_service_impl.h b/test/cpp/end2end/test_service_impl.h
index fad7768b87..e36423d44e 100644
--- a/test/cpp/end2end/test_service_impl.h
+++ b/test/cpp/end2end/test_service_impl.h
@@ -36,6 +36,8 @@ const char* const kServerTryCancelRequest = "server_try_cancel";
const char* const kDebugInfoTrailerKey = "debug-info-bin";
const char* const kServerFinishAfterNReads = "server_finish_after_n_reads";
const char* const kServerUseCoalescingApi = "server_use_coalescing_api";
+const char* const kCheckClientInitialMetadataKey = "custom_client_metadata";
+const char* const kCheckClientInitialMetadataVal = "Value for client metadata";
typedef enum {
DO_NOT_CANCEL = 0,
@@ -53,6 +55,10 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
Status Echo(ServerContext* context, const EchoRequest* request,
EchoResponse* response) override;
+ Status CheckClientInitialMetadata(ServerContext* context,
+ const SimpleRequest* request,
+ SimpleResponse* response) override;
+
// Unimplemented is left unimplemented to test the returned error.
Status RequestStream(ServerContext* context,
@@ -88,6 +94,11 @@ class CallbackTestServiceImpl
EchoResponse* response,
experimental::ServerCallbackRpcController* controller) override;
+ void CheckClientInitialMetadata(
+ ServerContext* context, const SimpleRequest* request,
+ SimpleResponse* response,
+ experimental::ServerCallbackRpcController* controller) override;
+
experimental::ServerReadReactor<EchoRequest, EchoResponse>* RequestStream()
override;
diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD
index 84ea386870..097e92f583 100644
--- a/test/cpp/microbenchmarks/BUILD
+++ b/test/cpp/microbenchmarks/BUILD
@@ -29,6 +29,7 @@ grpc_cc_test(
grpc_cc_library(
name = "helpers",
+ testonly = 1,
srcs = ["helpers.cc"],
hdrs = [
"fullstack_context_mutators.h",
@@ -46,67 +47,67 @@ grpc_cc_library(
],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_closure",
+ testonly = 1,
srcs = ["bm_closure.cc"],
deps = [":helpers"],
- uses_polling = False,
)
-# TODO(https://github.com/grpc/grpc/pull/16882): make this a test target
-# right now it OOMs
grpc_cc_binary(
name = "bm_arena",
+ testonly = 1,
srcs = ["bm_arena.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_channel",
+ testonly = 1,
srcs = ["bm_channel.cc"],
deps = [":helpers"],
- uses_polling = False,
)
-# TODO(https://github.com/grpc/grpc/pull/16882): make this a test target
-# right now it fails UBSAN
grpc_cc_binary(
name = "bm_call_create",
+ testonly = 1,
srcs = ["bm_call_create.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_cq",
+ testonly = 1,
srcs = ["bm_cq.cc"],
deps = [":helpers"],
- uses_polling = False,
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_cq_multiple_threads",
+ testonly = 1,
srcs = ["bm_cq_multiple_threads.cc"],
deps = [":helpers"],
- uses_polling = False,
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_error",
+ testonly = 1,
srcs = ["bm_error.cc"],
deps = [":helpers"],
- uses_polling = False,
)
grpc_cc_library(
name = "fullstack_streaming_ping_pong_h",
+ testonly = 1,
hdrs = [
"fullstack_streaming_ping_pong.h",
],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_streaming_ping_pong",
+ testonly = 1,
srcs = [
"bm_fullstack_streaming_ping_pong.cc",
],
@@ -115,14 +116,16 @@ grpc_cc_test(
grpc_cc_library(
name = "fullstack_streaming_pump_h",
+ testonly = 1,
hdrs = [
"fullstack_streaming_pump.h",
],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_streaming_pump",
+ testonly = 1,
srcs = [
"bm_fullstack_streaming_pump.cc",
],
@@ -131,50 +134,41 @@ grpc_cc_test(
grpc_cc_binary(
name = "bm_fullstack_trickle",
+ testonly = 1,
srcs = ["bm_fullstack_trickle.cc"],
deps = [":helpers"],
)
grpc_cc_library(
name = "fullstack_unary_ping_pong_h",
+ testonly = 1,
hdrs = [
"fullstack_unary_ping_pong.h",
],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_unary_ping_pong",
+ testonly = 1,
srcs = [
"bm_fullstack_unary_ping_pong.cc",
],
deps = [":fullstack_unary_ping_pong_h"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_metadata",
+ testonly = 1,
srcs = ["bm_metadata.cc"],
deps = [":helpers"],
- uses_polling = False,
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_chttp2_hpack",
+ testonly = 1,
srcs = ["bm_chttp2_hpack.cc"],
deps = [":helpers"],
- uses_polling = False,
-)
-
-grpc_cc_test(
- name = "bm_chttp2_transport",
- srcs = ["bm_chttp2_transport.cc"],
- deps = [":helpers"],
-)
-
-grpc_cc_test(
- name = "bm_pollset",
- srcs = ["bm_pollset.cc"],
- deps = [":helpers"],
)
grpc_cc_binary(
diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc
index a0157c66c2..8d12606434 100644
--- a/test/cpp/microbenchmarks/bm_call_create.cc
+++ b/test/cpp/microbenchmarks/bm_call_create.cc
@@ -526,7 +526,7 @@ static void BM_IsolatedFilter(benchmark::State& state) {
grpc_core::ExecCtx exec_ctx;
size_t channel_size = grpc_channel_stack_size(
- filters.size() == 0 ? nullptr : filters.data(), filters.size());
+ filters.size() == 0 ? nullptr : &filters[0], filters.size());
grpc_channel_stack* channel_stack =
static_cast<grpc_channel_stack*>(gpr_zalloc(channel_size));
GPR_ASSERT(GRPC_LOG_IF_ERROR(
diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD
index 57eaf3baf2..61e65029ff 100644
--- a/test/cpp/util/BUILD
+++ b/test/cpp/util/BUILD
@@ -181,6 +181,7 @@ grpc_cc_test(
data = [
"//src/proto/grpc/testing:echo.proto",
"//src/proto/grpc/testing:echo_messages.proto",
+ "//src/proto/grpc/testing:simple_messages.proto",
],
external_deps = [
"gtest",
@@ -192,6 +193,7 @@ grpc_cc_test(
"//:grpc++_reflection",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
+ "//src/proto/grpc/testing:simple_messages_proto",
"//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util",
],
diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc
index 4ddc11c5a6..b96b00f2db 100644
--- a/test/cpp/util/grpc_tool_test.cc
+++ b/test/cpp/util/grpc_tool_test.cc
@@ -48,6 +48,7 @@ using grpc::testing::EchoResponse;
#define ECHO_TEST_SERVICE_SUMMARY \
"Echo\n" \
+ "CheckClientInitialMetadata\n" \
"RequestStream\n" \
"ResponseStream\n" \
"BidiStream\n" \
@@ -59,6 +60,8 @@ using grpc::testing::EchoResponse;
"service EchoTestService {\n" \
" rpc Echo(grpc.testing.EchoRequest) returns (grpc.testing.EchoResponse) " \
"{}\n" \
+ " rpc CheckClientInitialMetadata(grpc.testing.SimpleRequest) returns " \
+ "(grpc.testing.SimpleResponse) {}\n" \
" rpc RequestStream(stream grpc.testing.EchoRequest) returns " \
"(grpc.testing.EchoResponse) {}\n" \
" rpc ResponseStream(grpc.testing.EchoRequest) returns (stream " \