aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/client/BUILD3
-rw-r--r--test/cpp/codegen/BUILD42
-rw-r--r--test/cpp/common/BUILD40
-rw-r--r--test/cpp/common/auth_property_iterator_test.cc17
-rw-r--r--test/cpp/common/secure_auth_context_test.cc14
-rw-r--r--test/cpp/end2end/BUILD28
-rw-r--r--test/cpp/end2end/channelz_service_test.cc82
-rw-r--r--test/cpp/end2end/client_interceptors_end2end_test.cc24
-rw-r--r--test/cpp/end2end/grpclb_end2end_test.cc45
-rw-r--r--test/cpp/end2end/interceptors_util.h16
-rw-r--r--test/cpp/end2end/server_interceptors_end2end_test.cc5
-rw-r--r--test/cpp/ext/filters/census/BUILD5
-rw-r--r--test/cpp/grpclb/BUILD1
-rw-r--r--test/cpp/interop/BUILD1
-rw-r--r--test/cpp/microbenchmarks/BUILD9
-rw-r--r--test/cpp/microbenchmarks/bm_byte_buffer.cc65
-rw-r--r--test/cpp/naming/BUILD14
-rwxr-xr-xtest/cpp/naming/gen_build_yaml.py4
-rwxr-xr-xtest/cpp/naming/generate_resolver_component_tests.bzl3
-rw-r--r--test/cpp/qps/BUILD3
-rw-r--r--test/cpp/qps/qps_benchmark_script.bzl1
-rw-r--r--test/cpp/qps/server_callback.cc46
-rw-r--r--test/cpp/server/BUILD18
-rw-r--r--test/cpp/server/load_reporter/BUILD2
-rw-r--r--test/cpp/test/BUILD1
-rw-r--r--test/cpp/thread_manager/BUILD1
-rw-r--r--test/cpp/util/BUILD14
27 files changed, 368 insertions, 136 deletions
diff --git a/test/cpp/client/BUILD b/test/cpp/client/BUILD
index c03ea92d34..1d90e36191 100644
--- a/test/cpp/client/BUILD
+++ b/test/cpp/client/BUILD
@@ -28,7 +28,7 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//:grpc++",
- "//test/core/util:gpr_test_util",
+ "//test/core/util:grpc_test_util",
],
)
@@ -44,7 +44,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/end2end:test_service_impl",
"//test/cpp/util:test_util",
diff --git a/test/cpp/codegen/BUILD b/test/cpp/codegen/BUILD
index 12712a3e6c..558e5e7818 100644
--- a/test/cpp/codegen/BUILD
+++ b/test/cpp/codegen/BUILD
@@ -21,76 +21,76 @@ grpc_package(name = "test/cpp/codegen")
grpc_cc_test(
name = "codegen_test_full",
srcs = ["codegen_test_full.cc"],
- deps = [
- "//:grpc++",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ "//:grpc++",
+ "//test/core/util:grpc_test_util",
+ ],
)
grpc_cc_test(
name = "codegen_test_minimal",
srcs = ["codegen_test_minimal.cc"],
- deps = [
- "//:grpc++",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ "//:grpc++",
+ "//test/core/util:grpc_test_util",
+ ],
)
grpc_cc_test(
name = "proto_utils_test",
srcs = ["proto_utils_test.cc"],
- deps = [
- "//:grpc++",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
"protobuf",
],
+ deps = [
+ "//:grpc++",
+ "//test/core/util:grpc_test_util",
+ ],
)
grpc_cc_binary(
name = "golden_file_test",
testonly = True,
srcs = ["golden_file_test.cc"],
- deps = [
- "//:grpc++",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
"gflags",
],
+ deps = [
+ "//:grpc++",
+ "//test/core/util:grpc_test_util",
+ ],
)
genrule(
name = "copy_compiler_test_grpc_pb_h",
srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"],
- cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.h > $@",
outs = ["compiler_test.grpc.pb.h"],
+ cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.h > $@",
)
genrule(
name = "copy_compiler_test_mock_grpc_pb_h",
srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"],
- cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test_mock.grpc.pb.h > $@",
outs = ["compiler_test_mock.grpc.pb.h"],
+ cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test_mock.grpc.pb.h > $@",
)
grpc_sh_test(
name = "run_golden_file_test",
srcs = ["run_golden_file_test.sh"],
data = [
- ":golden_file_test",
- ":compiler_test_golden",
- ":compiler_test_mock_golden",
":compiler_test.grpc.pb.h",
+ ":compiler_test_golden",
":compiler_test_mock.grpc.pb.h",
+ ":compiler_test_mock_golden",
+ ":golden_file_test",
],
)
diff --git a/test/cpp/common/BUILD b/test/cpp/common/BUILD
index 2cf3ad669f..01699b26ad 100644
--- a/test/cpp/common/BUILD
+++ b/test/cpp/common/BUILD
@@ -21,61 +21,61 @@ grpc_package(name = "test/cpp/common")
grpc_cc_test(
name = "alarm_test",
srcs = ["alarm_test.cc"],
- deps = [
- "//:grpc++_unsecure",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ "//:grpc++_unsecure",
+ "//test/core/util:grpc_test_util_unsecure",
+ ],
)
grpc_cc_test(
name = "auth_property_iterator_test",
srcs = ["auth_property_iterator_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
deps = [
"//:grpc++",
- "//test/core/util:gpr_test_util",
+ "//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
- external_deps = [
- "gtest",
- ],
)
grpc_cc_test(
name = "channel_arguments_test",
srcs = ["channel_arguments_test.cc"],
- deps = [
- "//:grpc++",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ "//:grpc++",
+ "//test/core/util:grpc_test_util",
+ ],
)
grpc_cc_test(
name = "channel_filter_test",
srcs = ["channel_filter_test.cc"],
- deps = [
- "//:grpc++",
- "//test/core/util:gpr_test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ "//:grpc++",
+ "//test/core/util:grpc_test_util",
+ ],
)
grpc_cc_test(
name = "secure_auth_context_test",
srcs = ["secure_auth_context_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
deps = [
"//:grpc++",
- "//test/core/util:gpr_test_util",
+ "//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
- external_deps = [
- "gtest",
- ],
)
diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc
index 9634555e4b..5a2844d518 100644
--- a/test/cpp/common/auth_property_iterator_test.cc
+++ b/test/cpp/common/auth_property_iterator_test.cc
@@ -40,15 +40,14 @@ class TestAuthPropertyIterator : public AuthPropertyIterator {
class AuthPropertyIteratorTest : public ::testing::Test {
protected:
void SetUp() override {
- ctx_ = grpc_auth_context_create(nullptr);
- grpc_auth_context_add_cstring_property(ctx_, "name", "chapi");
- grpc_auth_context_add_cstring_property(ctx_, "name", "chapo");
- grpc_auth_context_add_cstring_property(ctx_, "foo", "bar");
- EXPECT_EQ(1,
- grpc_auth_context_set_peer_identity_property_name(ctx_, "name"));
+ ctx_ = grpc_core::MakeRefCounted<grpc_auth_context>(nullptr);
+ grpc_auth_context_add_cstring_property(ctx_.get(), "name", "chapi");
+ grpc_auth_context_add_cstring_property(ctx_.get(), "name", "chapo");
+ grpc_auth_context_add_cstring_property(ctx_.get(), "foo", "bar");
+ EXPECT_EQ(1, grpc_auth_context_set_peer_identity_property_name(ctx_.get(),
+ "name"));
}
- void TearDown() override { grpc_auth_context_release(ctx_); }
- grpc_auth_context* ctx_;
+ grpc_core::RefCountedPtr<grpc_auth_context> ctx_;
};
TEST_F(AuthPropertyIteratorTest, DefaultCtor) {
@@ -59,7 +58,7 @@ TEST_F(AuthPropertyIteratorTest, DefaultCtor) {
TEST_F(AuthPropertyIteratorTest, GeneralTest) {
grpc_auth_property_iterator c_iter =
- grpc_auth_context_property_iterator(ctx_);
+ grpc_auth_context_property_iterator(ctx_.get());
const grpc_auth_property* property =
grpc_auth_property_iterator_next(&c_iter);
TestAuthPropertyIterator iter(property, &c_iter);
diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc
index 6461f49743..03b3a9fdd8 100644
--- a/test/cpp/common/secure_auth_context_test.cc
+++ b/test/cpp/common/secure_auth_context_test.cc
@@ -33,7 +33,7 @@ class SecureAuthContextTest : public ::testing::Test {};
// Created with nullptr
TEST_F(SecureAuthContextTest, EmptyContext) {
- SecureAuthContext context(nullptr, true);
+ SecureAuthContext context(nullptr);
EXPECT_TRUE(context.GetPeerIdentity().empty());
EXPECT_TRUE(context.GetPeerIdentityPropertyName().empty());
EXPECT_TRUE(context.FindPropertyValues("").empty());
@@ -42,8 +42,10 @@ TEST_F(SecureAuthContextTest, EmptyContext) {
}
TEST_F(SecureAuthContextTest, Properties) {
- grpc_auth_context* ctx = grpc_auth_context_create(nullptr);
- SecureAuthContext context(ctx, true);
+ grpc_core::RefCountedPtr<grpc_auth_context> ctx =
+ grpc_core::MakeRefCounted<grpc_auth_context>(nullptr);
+ SecureAuthContext context(ctx.get());
+ ctx.reset();
context.AddProperty("name", "chapi");
context.AddProperty("name", "chapo");
context.AddProperty("foo", "bar");
@@ -60,8 +62,10 @@ TEST_F(SecureAuthContextTest, Properties) {
}
TEST_F(SecureAuthContextTest, Iterators) {
- grpc_auth_context* ctx = grpc_auth_context_create(nullptr);
- SecureAuthContext context(ctx, true);
+ grpc_core::RefCountedPtr<grpc_auth_context> ctx =
+ grpc_core::MakeRefCounted<grpc_auth_context>(nullptr);
+ SecureAuthContext context(ctx.get());
+ ctx.reset();
context.AddProperty("name", "chapi");
context.AddProperty("name", "chapo");
context.AddProperty("foo", "bar");
diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD
index eb600ffb17..762d2302af 100644
--- a/test/cpp/end2end/BUILD
+++ b/test/cpp/end2end/BUILD
@@ -75,7 +75,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -97,7 +96,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -118,7 +116,6 @@ grpc_cc_binary(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -136,9 +133,8 @@ 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",
+ "//src/proto/grpc/testing:simple_messages_proto",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -158,7 +154,6 @@ grpc_cc_test(
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -180,7 +175,6 @@ grpc_cc_library(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -201,7 +195,6 @@ grpc_cc_test(
"//src/proto/grpc/channelz:channelz_proto",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -219,7 +212,6 @@ grpc_cc_test(
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -244,7 +236,6 @@ grpc_cc_test(
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -263,7 +254,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -282,7 +272,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -304,7 +293,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -324,7 +312,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -344,7 +331,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -365,7 +351,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -383,7 +368,6 @@ grpc_cc_test(
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -403,7 +387,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -426,7 +409,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -448,7 +430,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:grpc++_proto_reflection_desc_db",
"//test/cpp/util:test_util",
@@ -469,7 +450,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -491,7 +471,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -512,7 +491,6 @@ grpc_cc_binary(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -532,7 +510,6 @@ grpc_cc_test(
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -565,7 +542,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -584,7 +560,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -603,7 +578,6 @@ grpc_cc_test(
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
diff --git a/test/cpp/end2end/channelz_service_test.cc b/test/cpp/end2end/channelz_service_test.cc
index 29b59e4e5e..425334d972 100644
--- a/test/cpp/end2end/channelz_service_test.cc
+++ b/test/cpp/end2end/channelz_service_test.cc
@@ -54,6 +54,14 @@ using grpc::channelz::v1::GetSubchannelResponse;
using grpc::channelz::v1::GetTopChannelsRequest;
using grpc::channelz::v1::GetTopChannelsResponse;
+// This code snippet can be used to print out any responses for
+// visual debugging.
+//
+//
+// string out_str;
+// google::protobuf::TextFormat::PrintToString(resp, &out_str);
+// std::cout << "resp: " << out_str << "\n";
+
namespace grpc {
namespace testing {
namespace {
@@ -164,6 +172,19 @@ class ChannelzServerTest : public ::testing::Test {
echo_stub_ = grpc::testing::EchoTestService::NewStub(channel);
}
+ std::unique_ptr<grpc::testing::EchoTestService::Stub> NewEchoStub() {
+ static int salt = 0;
+ string target = "dns:localhost:" + to_string(proxy_port_);
+ ChannelArguments args;
+ // disable channelz. We only want to focus on proxy to backend outbound.
+ args.SetInt(GRPC_ARG_ENABLE_CHANNELZ, 0);
+ // This ensures that gRPC will not do connection sharing.
+ args.SetInt("salt", salt++);
+ std::shared_ptr<Channel> channel =
+ CreateCustomChannel(target, InsecureChannelCredentials(), args);
+ return grpc::testing::EchoTestService::NewStub(channel);
+ }
+
void SendSuccessfulEcho(int channel_idx) {
EchoRequest request;
EchoResponse response;
@@ -651,6 +672,67 @@ TEST_F(ChannelzServerTest, GetServerSocketsTest) {
EXPECT_EQ(get_server_sockets_response.socket_ref_size(), 1);
}
+TEST_F(ChannelzServerTest, GetServerSocketsPaginationTest) {
+ ResetStubs();
+ ConfigureProxy(1);
+ std::vector<std::unique_ptr<grpc::testing::EchoTestService::Stub>> stubs;
+ const int kNumServerSocketsCreated = 20;
+ for (int i = 0; i < kNumServerSocketsCreated; ++i) {
+ stubs.push_back(NewEchoStub());
+ EchoRequest request;
+ EchoResponse response;
+ request.set_message("Hello channelz");
+ request.mutable_param()->set_backend_channel_idx(0);
+ ClientContext context;
+ Status s = stubs.back()->Echo(&context, request, &response);
+ EXPECT_EQ(response.message(), request.message());
+ EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+ }
+ GetServersRequest get_server_request;
+ GetServersResponse get_server_response;
+ get_server_request.set_start_server_id(0);
+ ClientContext get_server_context;
+ Status s = channelz_stub_->GetServers(&get_server_context, get_server_request,
+ &get_server_response);
+ EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+ EXPECT_EQ(get_server_response.server_size(), 1);
+ // Make a request that gets all of the serversockets
+ {
+ GetServerSocketsRequest get_server_sockets_request;
+ GetServerSocketsResponse get_server_sockets_response;
+ get_server_sockets_request.set_server_id(
+ get_server_response.server(0).ref().server_id());
+ get_server_sockets_request.set_start_socket_id(0);
+ ClientContext get_server_sockets_context;
+ s = channelz_stub_->GetServerSockets(&get_server_sockets_context,
+ get_server_sockets_request,
+ &get_server_sockets_response);
+ EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+ // We add one to account the the channelz stub that will end up creating
+ // a serversocket.
+ EXPECT_EQ(get_server_sockets_response.socket_ref_size(),
+ kNumServerSocketsCreated + 1);
+ EXPECT_TRUE(get_server_sockets_response.end());
+ }
+ // Now we make a request that exercises pagination.
+ {
+ GetServerSocketsRequest get_server_sockets_request;
+ GetServerSocketsResponse get_server_sockets_response;
+ get_server_sockets_request.set_server_id(
+ get_server_response.server(0).ref().server_id());
+ get_server_sockets_request.set_start_socket_id(0);
+ const int kMaxResults = 10;
+ get_server_sockets_request.set_max_results(kMaxResults);
+ ClientContext get_server_sockets_context;
+ s = channelz_stub_->GetServerSockets(&get_server_sockets_context,
+ get_server_sockets_request,
+ &get_server_sockets_response);
+ EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+ EXPECT_EQ(get_server_sockets_response.socket_ref_size(), kMaxResults);
+ EXPECT_FALSE(get_server_sockets_response.end());
+ }
+}
+
TEST_F(ChannelzServerTest, GetServerListenSocketsTest) {
ResetStubs();
ConfigureProxy(1);
diff --git a/test/cpp/end2end/client_interceptors_end2end_test.cc b/test/cpp/end2end/client_interceptors_end2end_test.cc
index 968b5d49d1..8abf4eb3f4 100644
--- a/test/cpp/end2end/client_interceptors_end2end_test.cc
+++ b/test/cpp/end2end/client_interceptors_end2end_test.cc
@@ -23,11 +23,11 @@
#include <grpcpp/client_context.h>
#include <grpcpp/create_channel.h>
#include <grpcpp/generic/generic_stub.h>
-#include <grpcpp/impl/codegen/client_interceptor.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include <grpcpp/support/client_interceptor.h>
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -467,6 +467,28 @@ TEST_F(ClientInterceptorsEnd2endTest,
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
}
+TEST_F(ClientInterceptorsEnd2endTest,
+ ClientInterceptorFactoryAllowsNullptrReturn) {
+ ChannelArguments args;
+ DummyInterceptor::Reset();
+ std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
+ creators;
+ creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
+ new LoggingInterceptorFactory()));
+ // Add 20 dummy interceptors and 20 null interceptors
+ for (auto i = 0; i < 20; i++) {
+ creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
+ new DummyInterceptorFactory()));
+ creators.push_back(
+ std::unique_ptr<NullInterceptorFactory>(new NullInterceptorFactory()));
+ }
+ auto channel = server_->experimental().InProcessChannelWithInterceptors(
+ args, std::move(creators));
+ MakeCallbackCall(channel);
+ // Make sure all 20 dummy interceptors were run
+ EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+}
+
class ClientInterceptorsStreamingEnd2endTest : public ::testing::Test {
protected:
ClientInterceptorsStreamingEnd2endTest() {
diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc
index bf990a07b5..f739ed032b 100644
--- a/test/cpp/end2end/grpclb_end2end_test.cc
+++ b/test/cpp/end2end/grpclb_end2end_test.cc
@@ -18,6 +18,7 @@
#include <memory>
#include <mutex>
+#include <set>
#include <sstream>
#include <thread>
@@ -145,6 +146,7 @@ class BackendServiceImpl : public BackendService {
IncreaseRequestCount();
const auto status = TestServiceImpl::Echo(context, request, response);
IncreaseResponseCount();
+ AddClient(context->peer());
return status;
}
@@ -157,9 +159,21 @@ class BackendServiceImpl : public BackendService {
return prev;
}
+ std::set<grpc::string> clients() {
+ std::unique_lock<std::mutex> lock(clients_mu_);
+ return clients_;
+ }
+
private:
+ void AddClient(const grpc::string& client) {
+ std::unique_lock<std::mutex> lock(clients_mu_);
+ clients_.insert(client);
+ }
+
std::mutex mu_;
bool shutdown_ = false;
+ std::mutex clients_mu_;
+ std::set<grpc::string> clients_;
};
grpc::string Ip4ToPackedString(const char* ip_str) {
@@ -303,6 +317,11 @@ class BalancerServiceImpl : public BalancerService {
auto* server = response.mutable_server_list()->add_servers();
server->set_ip_address(Ip4ToPackedString("127.0.0.1"));
server->set_port(backend_port);
+ static int token_count = 0;
+ char* token;
+ gpr_asprintf(&token, "token%03d", ++token_count);
+ server->set_load_balance_token(token);
+ gpr_free(token);
}
return response;
}
@@ -414,8 +433,8 @@ class GrpclbEnd2endTest : public ::testing::Test {
std::shared_ptr<ChannelCredentials> creds(
new SecureChannelCredentials(grpc_composite_channel_credentials_create(
channel_creds, call_creds, nullptr)));
- grpc_call_credentials_unref(call_creds);
- grpc_channel_credentials_unref(channel_creds);
+ call_creds->Unref();
+ channel_creds->Unref();
channel_ = CreateCustomChannel(uri.str(), creds, args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}
@@ -675,6 +694,28 @@ TEST_F(SingleBalancerTest, Vanilla) {
EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName());
}
+TEST_F(SingleBalancerTest, SameBackendListedMultipleTimes) {
+ SetNextResolutionAllBalancers();
+ // Same backend listed twice.
+ std::vector<int> ports;
+ ports.push_back(backend_servers_[0].port_);
+ ports.push_back(backend_servers_[0].port_);
+ const size_t kNumRpcsPerAddress = 10;
+ ScheduleResponseForBalancer(
+ 0, BalancerServiceImpl::BuildResponseForBackends(ports, {}), 0);
+ // We need to wait for the backend to come online.
+ WaitForBackend(0);
+ // Send kNumRpcsPerAddress RPCs per server.
+ CheckRpcSendOk(kNumRpcsPerAddress * ports.size());
+ // Backend should have gotten 20 requests.
+ EXPECT_EQ(kNumRpcsPerAddress * 2,
+ backend_servers_[0].service_->request_count());
+ // And they should have come from a single client port, because of
+ // subchannel sharing.
+ EXPECT_EQ(1UL, backends_[0]->clients().size());
+ balancers_[0]->NotifyDoneWithServerlists();
+}
+
TEST_F(SingleBalancerTest, SecureNaming) {
ResetStub(0, kApplicationTargetName_ + ";lb");
SetNextResolution({AddressData{balancer_servers_[0].port_, true, "lb"}});
diff --git a/test/cpp/end2end/interceptors_util.h b/test/cpp/end2end/interceptors_util.h
index d886e32494..659e613d2e 100644
--- a/test/cpp/end2end/interceptors_util.h
+++ b/test/cpp/end2end/interceptors_util.h
@@ -82,6 +82,22 @@ class DummyInterceptorFactory
}
};
+/* This interceptor factory returns nullptr on interceptor creation */
+class NullInterceptorFactory
+ : public experimental::ClientInterceptorFactoryInterface,
+ public experimental::ServerInterceptorFactoryInterface {
+ public:
+ virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::ClientRpcInfo* info) override {
+ return nullptr;
+ }
+
+ virtual experimental::Interceptor* CreateServerInterceptor(
+ experimental::ServerRpcInfo* info) override {
+ return nullptr;
+ }
+};
+
class EchoTestServiceStreamingImpl : public EchoTestService::Service {
public:
~EchoTestServiceStreamingImpl() override {}
diff --git a/test/cpp/end2end/server_interceptors_end2end_test.cc b/test/cpp/end2end/server_interceptors_end2end_test.cc
index 9460a7d6c6..53d8c4dc96 100644
--- a/test/cpp/end2end/server_interceptors_end2end_test.cc
+++ b/test/cpp/end2end/server_interceptors_end2end_test.cc
@@ -24,10 +24,10 @@
#include <grpcpp/create_channel.h>
#include <grpcpp/generic/generic_stub.h>
#include <grpcpp/impl/codegen/proto_utils.h>
-#include <grpcpp/impl/codegen/server_interceptor.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include <grpcpp/support/server_interceptor.h>
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -176,9 +176,12 @@ class ServerInterceptorsEnd2endSyncUnaryTest : public ::testing::Test {
creators.push_back(
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>(
new LoggingInterceptorFactory()));
+ // Add 20 dummy interceptor factories and null interceptor factories
for (auto i = 0; i < 20; i++) {
creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
new DummyInterceptorFactory()));
+ creators.push_back(std::unique_ptr<NullInterceptorFactory>(
+ new NullInterceptorFactory()));
}
builder.experimental().SetInterceptorCreators(std::move(creators));
server_ = builder.BuildAndStart();
diff --git a/test/cpp/ext/filters/census/BUILD b/test/cpp/ext/filters/census/BUILD
index 6567dc667a..78b27e2063 100644
--- a/test/cpp/ext/filters/census/BUILD
+++ b/test/cpp/ext/filters/census/BUILD
@@ -24,19 +24,18 @@ grpc_cc_test(
srcs = [
"stats_plugin_end2end_test.cc",
],
- language = "C++",
external_deps = [
"gtest",
"gmock",
"opencensus-stats-test",
],
+ language = "C++",
deps = [
"//:grpc++",
"//:grpc_opencensus_plugin",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
- "//test/cpp/util:test_util",
"//test/cpp/util:test_config",
+ "//test/cpp/util:test_util",
],
)
diff --git a/test/cpp/grpclb/BUILD b/test/cpp/grpclb/BUILD
index 8319eb5142..2f74a9bab0 100644
--- a/test/cpp/grpclb/BUILD
+++ b/test/cpp/grpclb/BUILD
@@ -32,7 +32,6 @@ grpc_cc_test(
"//:grpc",
"//:grpc++",
"//src/proto/grpc/lb/v1:load_balancer_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
diff --git a/test/cpp/interop/BUILD b/test/cpp/interop/BUILD
index 0f81305405..f36494d98d 100644
--- a/test/cpp/interop/BUILD
+++ b/test/cpp/interop/BUILD
@@ -157,7 +157,6 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//:grpc++",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD
index 097e92f583..b5890bece7 100644
--- a/test/cpp/microbenchmarks/BUILD
+++ b/test/cpp/microbenchmarks/BUILD
@@ -24,7 +24,7 @@ grpc_cc_test(
external_deps = [
"benchmark",
],
- deps = ["//test/core/util:gpr_test_util"],
+ deps = ["//test/core/util:grpc_test_util"],
)
grpc_cc_library(
@@ -62,6 +62,13 @@ grpc_cc_binary(
)
grpc_cc_binary(
+ name = "bm_byte_buffer",
+ testonly = 1,
+ srcs = ["bm_byte_buffer.cc"],
+ deps = [":helpers"],
+)
+
+grpc_cc_binary(
name = "bm_channel",
testonly = 1,
srcs = ["bm_channel.cc"],
diff --git a/test/cpp/microbenchmarks/bm_byte_buffer.cc b/test/cpp/microbenchmarks/bm_byte_buffer.cc
new file mode 100644
index 0000000000..a359e6f621
--- /dev/null
+++ b/test/cpp/microbenchmarks/bm_byte_buffer.cc
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+/* This benchmark exists to show that byte-buffer copy is size-independent */
+
+#include <memory>
+
+#include <benchmark/benchmark.h>
+#include <grpcpp/impl/grpc_library.h>
+#include <grpcpp/support/byte_buffer.h>
+#include "test/cpp/microbenchmarks/helpers.h"
+#include "test/cpp/util/test_config.h"
+
+namespace grpc {
+namespace testing {
+
+auto& force_library_initialization = Library::get();
+
+static void BM_ByteBuffer_Copy(benchmark::State& state) {
+ int num_slices = state.range(0);
+ size_t slice_size = state.range(1);
+ std::vector<grpc::Slice> slices;
+ while (num_slices > 0) {
+ num_slices--;
+ std::unique_ptr<char[]> buf(new char[slice_size]);
+ memset(buf.get(), 0, slice_size);
+ slices.emplace_back(buf.get(), slice_size);
+ }
+ grpc::ByteBuffer bb(slices.data(), num_slices);
+ while (state.KeepRunning()) {
+ grpc::ByteBuffer cc(bb);
+ }
+}
+BENCHMARK(BM_ByteBuffer_Copy)->Ranges({{1, 64}, {1, 1024 * 1024}});
+
+} // namespace testing
+} // namespace grpc
+
+// Some distros have RunSpecifiedBenchmarks under the benchmark namespace,
+// and others do not. This allows us to support both modes.
+namespace benchmark {
+void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); }
+} // namespace benchmark
+
+int main(int argc, char** argv) {
+ ::benchmark::Initialize(&argc, argv);
+ ::grpc::testing::InitTest(&argc, &argv, false);
+ benchmark::RunTheBenchmarksNamespaced();
+ return 0;
+}
diff --git a/test/cpp/naming/BUILD b/test/cpp/naming/BUILD
index 2925e8fbcf..58e70480ac 100644
--- a/test/cpp/naming/BUILD
+++ b/test/cpp/naming/BUILD
@@ -23,16 +23,15 @@ package(
licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_py_binary", "grpc_cc_test")
-
load(":generate_resolver_component_tests.bzl", "generate_resolver_component_tests")
# Meant to be invoked only through the top-level shell script driver.
grpc_py_binary(
name = "resolver_component_tests_runner",
+ testonly = True,
srcs = [
"resolver_component_tests_runner.py",
],
- testonly = True,
)
grpc_cc_test(
@@ -40,14 +39,13 @@ grpc_cc_test(
srcs = ["cancel_ares_query_test.cc"],
external_deps = ["gmock"],
deps = [
- "//test/cpp/util:test_util",
- "//test/core/util:grpc_test_util",
- "//test/core/util:gpr_test_util",
- "//:grpc++",
- "//:grpc",
"//:gpr",
- "//test/cpp/util:test_config",
+ "//:grpc",
+ "//:grpc++",
"//test/core/end2end:cq_verifier",
+ "//test/core/util:grpc_test_util",
+ "//test/cpp/util:test_config",
+ "//test/cpp/util:test_util",
],
)
diff --git a/test/cpp/naming/gen_build_yaml.py b/test/cpp/naming/gen_build_yaml.py
index 1c9d0676b8..da0effed93 100755
--- a/test/cpp/naming/gen_build_yaml.py
+++ b/test/cpp/naming/gen_build_yaml.py
@@ -72,7 +72,6 @@ def main():
'deps': [
'grpc++_test_util' + unsecure_build_config_suffix,
'grpc_test_util' + unsecure_build_config_suffix,
- 'gpr_test_util',
'grpc++' + unsecure_build_config_suffix,
'grpc' + unsecure_build_config_suffix,
'gpr',
@@ -91,7 +90,6 @@ def main():
'deps': [
'grpc++_test_util',
'grpc_test_util',
- 'gpr_test_util',
'grpc++',
'grpc',
'gpr',
@@ -114,7 +112,6 @@ def main():
'deps': [
'grpc++_test_util' + unsecure_build_config_suffix,
'grpc_test_util' + unsecure_build_config_suffix,
- 'gpr_test_util',
'grpc++' + unsecure_build_config_suffix,
'grpc' + unsecure_build_config_suffix,
'gpr',
@@ -133,7 +130,6 @@ def main():
'deps': [
'grpc++_test_util',
'grpc_test_util',
- 'gpr_test_util',
'grpc++',
'grpc',
'gpr',
diff --git a/test/cpp/naming/generate_resolver_component_tests.bzl b/test/cpp/naming/generate_resolver_component_tests.bzl
index 5e9aa63abe..f36021560c 100755
--- a/test/cpp/naming/generate_resolver_component_tests.bzl
+++ b/test/cpp/naming/generate_resolver_component_tests.bzl
@@ -28,7 +28,6 @@ def generate_resolver_component_tests():
deps = [
"//test/cpp/util:test_util%s" % unsecure_build_config_suffix,
"//test/core/util:grpc_test_util%s" % unsecure_build_config_suffix,
- "//test/core/util:gpr_test_util",
"//:grpc++%s" % unsecure_build_config_suffix,
"//:grpc%s" % unsecure_build_config_suffix,
"//:gpr",
@@ -48,7 +47,6 @@ def generate_resolver_component_tests():
deps = [
"//test/cpp/util:test_util%s" % unsecure_build_config_suffix,
"//test/core/util:grpc_test_util%s" % unsecure_build_config_suffix,
- "//test/core/util:gpr_test_util",
"//:grpc++%s" % unsecure_build_config_suffix,
"//:grpc%s" % unsecure_build_config_suffix,
"//:gpr",
@@ -63,7 +61,6 @@ def generate_resolver_component_tests():
deps = [
"//test/cpp/util:test_util",
"//test/core/util:grpc_test_util",
- "//test/core/util:gpr_test_util",
"//:grpc++",
"//:grpc",
"//:gpr",
diff --git a/test/cpp/qps/BUILD b/test/cpp/qps/BUILD
index 626ac5f3f2..8855a1c155 100644
--- a/test/cpp/qps/BUILD
+++ b/test/cpp/qps/BUILD
@@ -60,7 +60,6 @@ grpc_cc_library(
"//src/proto/grpc/testing:payloads_proto",
"//src/proto/grpc/testing:worker_service_proto",
"//test/core/end2end:ssl_test_data",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
@@ -86,7 +85,6 @@ grpc_cc_library(
"//src/proto/grpc/testing:messages_proto",
"//src/proto/grpc/testing:report_qps_scenario_service_proto",
"//src/proto/grpc/testing:worker_service_proto",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
@@ -205,7 +203,6 @@ grpc_cc_binary(
deps = [
":qps_worker_impl",
"//:grpc++",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
diff --git a/test/cpp/qps/qps_benchmark_script.bzl b/test/cpp/qps/qps_benchmark_script.bzl
index b2b67d988c..855caa0d37 100644
--- a/test/cpp/qps/qps_benchmark_script.bzl
+++ b/test/cpp/qps/qps_benchmark_script.bzl
@@ -69,7 +69,6 @@ def json_run_localhost_batch():
],
deps = [
"//:gpr",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
diff --git a/test/cpp/qps/server_callback.cc b/test/cpp/qps/server_callback.cc
index 8bedd44739..4a346dd017 100644
--- a/test/cpp/qps/server_callback.cc
+++ b/test/cpp/qps/server_callback.cc
@@ -34,13 +34,53 @@ class BenchmarkCallbackServiceImpl final
: public BenchmarkService::ExperimentalCallbackService {
public:
void UnaryCall(
- ServerContext* context, const SimpleRequest* request,
- SimpleResponse* response,
- experimental::ServerCallbackRpcController* controller) override {
+ ServerContext* context, const ::grpc::testing::SimpleRequest* request,
+ ::grpc::testing::SimpleResponse* response,
+ ::grpc::experimental::ServerCallbackRpcController* controller) override {
auto s = SetResponse(request, response);
controller->Finish(s);
}
+ ::grpc::experimental::ServerBidiReactor<::grpc::testing::SimpleRequest,
+ ::grpc::testing::SimpleResponse>*
+ StreamingCall() override {
+ class Reactor
+ : public ::grpc::experimental::ServerBidiReactor<
+ ::grpc::testing::SimpleRequest, ::grpc::testing::SimpleResponse> {
+ public:
+ Reactor() {}
+ void OnStarted(ServerContext* context) override { StartRead(&request_); }
+
+ void OnReadDone(bool ok) override {
+ if (!ok) {
+ Finish(::grpc::Status::OK);
+ return;
+ }
+ auto s = SetResponse(&request_, &response_);
+ if (!s.ok()) {
+ Finish(s);
+ return;
+ }
+ StartWrite(&response_);
+ }
+
+ void OnWriteDone(bool ok) override {
+ if (!ok) {
+ Finish(::grpc::Status::OK);
+ return;
+ }
+ StartRead(&request_);
+ }
+
+ void OnDone() override { delete (this); }
+
+ private:
+ SimpleRequest request_;
+ SimpleResponse response_;
+ };
+ return new Reactor;
+ }
+
private:
static Status SetResponse(const SimpleRequest* request,
SimpleResponse* response) {
diff --git a/test/cpp/server/BUILD b/test/cpp/server/BUILD
index 3f89d6e26e..050b83f5c4 100644
--- a/test/cpp/server/BUILD
+++ b/test/cpp/server/BUILD
@@ -21,38 +21,38 @@ grpc_package(name = "test/cpp/server")
grpc_cc_test(
name = "server_builder_test",
srcs = ["server_builder_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
deps = [
"//:grpc++_unsecure",
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_unsecure",
],
- external_deps = [
- "gtest",
- ],
)
grpc_cc_test(
name = "server_builder_with_socket_mutator_test",
srcs = ["server_builder_with_socket_mutator_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
deps = [
"//:grpc++_unsecure",
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_unsecure",
],
- external_deps = [
- "gtest",
- ],
)
grpc_cc_test(
name = "server_request_call_test",
srcs = ["server_request_call_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
deps = [
"//:grpc++_unsecure",
"//src/proto/grpc/testing:echo_proto",
"//test/core/util:grpc_test_util_unsecure",
],
- external_deps = [
- "gtest",
- ],
)
diff --git a/test/cpp/server/load_reporter/BUILD b/test/cpp/server/load_reporter/BUILD
index b7c4d29d71..8d876c56d2 100644
--- a/test/cpp/server/load_reporter/BUILD
+++ b/test/cpp/server/load_reporter/BUILD
@@ -43,7 +43,6 @@ grpc_cc_test(
"//:grpc",
"//:lb_load_reporter",
"//:lb_server_load_reporting_filter",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
],
)
@@ -58,7 +57,6 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//:lb_get_cpu_stats",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
],
)
diff --git a/test/cpp/test/BUILD b/test/cpp/test/BUILD
index c549478919..cd980dee84 100644
--- a/test/cpp/test/BUILD
+++ b/test/cpp/test/BUILD
@@ -32,7 +32,6 @@ grpc_cc_test(
"//:grpc",
"//:grpc++",
"//:grpc++_test",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
diff --git a/test/cpp/thread_manager/BUILD b/test/cpp/thread_manager/BUILD
index 093e51e3fa..30488774e4 100644
--- a/test/cpp/thread_manager/BUILD
+++ b/test/cpp/thread_manager/BUILD
@@ -32,7 +32,6 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//:grpc++",
- "//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD
index 61e65029ff..bb1ca868ff 100644
--- a/test/cpp/util/BUILD
+++ b/test/cpp/util/BUILD
@@ -93,14 +93,14 @@ grpc_cc_library(
hdrs = [
"channel_trace_proto_helper.h",
],
- deps = [
- "//:grpc++",
- "//src/proto/grpc/channelz:channelz_proto",
- ],
external_deps = [
"gtest",
"protobuf",
],
+ deps = [
+ "//:grpc++",
+ "//src/proto/grpc/channelz:channelz_proto",
+ ],
)
grpc_cc_library(
@@ -235,7 +235,7 @@ grpc_cc_test(
],
deps = [
"//:grpc++",
- "//test/core/util:gpr_test_util",
+ "//test/core/util:grpc_test_util",
],
)
@@ -279,7 +279,7 @@ grpc_cc_test(
deps = [
"//:grpc++_error_details",
"//src/proto/grpc/testing:echo_messages_proto",
- "//test/core/util:gpr_test_util",
+ "//test/core/util:grpc_test_util",
],
)
@@ -292,8 +292,8 @@ grpc_cc_binary(
"gflags",
],
deps = [
- ":grpc_cli_libs",
":grpc++_proto_reflection_desc_db",
+ ":grpc_cli_libs",
":test_config",
"//:grpc++",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",