diff options
author | Sree Kuchibhotla <sreek@google.com> | 2018-06-18 09:37:46 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2018-06-18 09:39:09 -0700 |
commit | 09d7da2652e64c38267bde4ba9c52673e2b97f32 (patch) | |
tree | fbdd9fbc058fa2c55a60044c1bd88bf429e4aa28 /test/core | |
parent | 16ad9b828073579d0c6364570a3803b26e7fb39d (diff) | |
parent | a2769d5ee4116152eead50678741906b1667923b (diff) |
Merge branch 'master' into epollex-ownerfd-fix
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/channel/BUILD | 1 | ||||
-rw-r--r-- | test/core/channel/channel_trace_test.cc | 7 | ||||
-rw-r--r-- | test/core/channel/channelz_registry_test.cc | 1 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_http_proxy.cc | 5 | ||||
-rw-r--r-- | test/core/end2end/fixtures/http_proxy_fixture.cc | 3 | ||||
-rw-r--r-- | test/core/gprpp/ref_counted_ptr_test.cc | 4 | ||||
-rw-r--r-- | test/core/security/BUILD | 4 | ||||
-rw-r--r-- | test/core/transport/BUILD | 1 | ||||
-rw-r--r-- | test/core/tsi/alts/crypt/BUILD | 1 | ||||
-rw-r--r-- | test/core/tsi/alts/frame_protector/BUILD | 4 | ||||
-rw-r--r-- | test/core/tsi/alts/handshaker/BUILD | 5 | ||||
-rw-r--r-- | test/core/tsi/alts/zero_copy_frame_protector/BUILD | 3 | ||||
-rw-r--r-- | test/core/util/BUILD | 5 |
13 files changed, 12 insertions, 32 deletions
diff --git a/test/core/channel/BUILD b/test/core/channel/BUILD index e5a9e36457..c554b20148 100644 --- a/test/core/channel/BUILD +++ b/test/core/channel/BUILD @@ -105,7 +105,6 @@ grpc_cc_test( language = "C++", deps = [ "//:grpc", - "//test/core/util:gpr_test_util", ], external_deps = [ "gtest", diff --git a/test/core/channel/channel_trace_test.cc b/test/core/channel/channel_trace_test.cc index 64de05bc0a..d99a32d91d 100644 --- a/test/core/channel/channel_trace_test.cc +++ b/test/core/channel/channel_trace_test.cc @@ -77,13 +77,13 @@ void ValidateChannelTraceData(grpc_json* json, ValidateJsonArraySize(json, "events", actual_num_events_expected); } -void AddSimpleTrace(RefCountedPtr<ChannelTrace> tracer) { +void AddSimpleTrace(const RefCountedPtr<ChannelTrace>& tracer) { tracer->AddTraceEvent(ChannelTrace::Severity::Info, grpc_slice_from_static_string("simple trace")); } // checks for the existence of all the required members of the tracer. -void ValidateChannelTrace(RefCountedPtr<ChannelTrace> tracer, +void ValidateChannelTrace(const RefCountedPtr<ChannelTrace>& tracer, size_t expected_num_event_logged, size_t max_nodes) { if (!max_nodes) return; char* json_str = tracer->RenderTrace(); @@ -95,7 +95,8 @@ void ValidateChannelTrace(RefCountedPtr<ChannelTrace> tracer, gpr_free(json_str); } -void ValidateTraceDataMatchedUuidLookup(RefCountedPtr<ChannelTrace> tracer) { +void ValidateTraceDataMatchedUuidLookup( + const RefCountedPtr<ChannelTrace>& tracer) { intptr_t uuid = tracer->GetUuid(); if (uuid == -1) return; // Doesn't make sense to lookup if tracing disabled char* tracer_json_str = tracer->RenderTrace(); diff --git a/test/core/channel/channelz_registry_test.cc b/test/core/channel/channelz_registry_test.cc index 37696dc0e8..eb6305eb4e 100644 --- a/test/core/channel/channelz_registry_test.cc +++ b/test/core/channel/channelz_registry_test.cc @@ -54,6 +54,7 @@ TEST(ChannelzRegistryTest, UuidStartsAboveZeroTest) { TEST(ChannelzRegistryTest, UuidsAreIncreasing) { int object_to_register; std::vector<intptr_t> uuids; + uuids.reserve(10); for (int i = 0; i < 10; ++i) { // reregister the same object. It's ok since we are just testing uuids uuids.push_back(ChannelzRegistry::Register(&object_to_register)); diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc index c2ac209cf9..0af8a29a15 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.cc +++ b/test/core/end2end/fixtures/h2_http_proxy.cc @@ -69,8 +69,9 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, char* proxy_uri; /* If testing for proxy auth, add credentials to proxy uri */ - const char* proxy_auth_str = - grpc_channel_args_get_string(client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); + const grpc_arg* proxy_auth_arg = + grpc_channel_args_find(client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); + const char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); if (proxy_auth_str == nullptr) { gpr_asprintf(&proxy_uri, "http://%s", grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 5caddee09e..f02fa9d998 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -411,8 +411,9 @@ static void on_read_request_done(void* arg, grpc_error* error) { return; } // If proxy auth is being used, check if the header is present and as expected - char* proxy_auth_str = grpc_channel_args_get_string( + const grpc_arg* proxy_auth_arg = grpc_channel_args_find( conn->proxy->channel_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); + char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); if (proxy_auth_str != nullptr) { bool client_authenticated = false; for (size_t i = 0; i < conn->http_request.hdr_count; i++) { diff --git a/test/core/gprpp/ref_counted_ptr_test.cc b/test/core/gprpp/ref_counted_ptr_test.cc index c810345166..aa30b72282 100644 --- a/test/core/gprpp/ref_counted_ptr_test.cc +++ b/test/core/gprpp/ref_counted_ptr_test.cc @@ -66,14 +66,14 @@ TEST(RefCountedPtr, MoveAssignment) { TEST(RefCountedPtr, CopyConstructor) { RefCountedPtr<Foo> foo(New<Foo>()); - RefCountedPtr<Foo> foo2(foo); + const RefCountedPtr<Foo>& foo2(foo); EXPECT_NE(nullptr, foo.get()); EXPECT_EQ(foo.get(), foo2.get()); } TEST(RefCountedPtr, CopyAssignment) { RefCountedPtr<Foo> foo(New<Foo>()); - RefCountedPtr<Foo> foo2 = foo; + const RefCountedPtr<Foo>& foo2 = foo; EXPECT_NE(nullptr, foo.get()); EXPECT_EQ(foo.get(), foo2.get()); } diff --git a/test/core/security/BUILD b/test/core/security/BUILD index 12aa84d93b..70bcc8c9c3 100644 --- a/test/core/security/BUILD +++ b/test/core/security/BUILD @@ -183,7 +183,6 @@ grpc_cc_test( "//:gpr", "//:gpr_base", "//:grpc", - "//test/core/util:gpr_test_util", ], ) @@ -196,7 +195,6 @@ grpc_cc_test( "//:gpr", "//:gpr_base", "//:grpc", - "//test/core/util:gpr_test_util", ], ) @@ -208,7 +206,6 @@ grpc_cc_test( "//:alts_util", "//:gpr", "//:grpc", - "//test/core/util:gpr_test_util", ], ) @@ -223,6 +220,5 @@ grpc_cc_test( "//:grpc_secure", "//:tsi", "//:tsi_interface", - "//test/core/util:gpr_test_util", ], ) diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD index 7ca1c1d943..84fb3a1421 100644 --- a/test/core/transport/BUILD +++ b/test/core/transport/BUILD @@ -129,7 +129,6 @@ grpc_cc_test( language = "C++", deps = [ "//:grpc", - "//test/core/util:gpr_test_util", ], external_deps = [ "gtest", diff --git a/test/core/tsi/alts/crypt/BUILD b/test/core/tsi/alts/crypt/BUILD index abe1e83656..cf9dbca316 100644 --- a/test/core/tsi/alts/crypt/BUILD +++ b/test/core/tsi/alts/crypt/BUILD @@ -27,7 +27,6 @@ grpc_cc_test( "//:alts_frame_protector", "//:gpr", "//:grpc", - "//test/core/util:gpr_test_util", ], ) diff --git a/test/core/tsi/alts/frame_protector/BUILD b/test/core/tsi/alts/frame_protector/BUILD index 6ff3015f4d..dd1966b379 100644 --- a/test/core/tsi/alts/frame_protector/BUILD +++ b/test/core/tsi/alts/frame_protector/BUILD @@ -27,7 +27,6 @@ grpc_cc_test( "//:gpr", "//:grpc", "//test/core/tsi/alts/crypt:alts_crypt_test_util", - "//test/core/util:gpr_test_util", ], ) @@ -40,7 +39,6 @@ grpc_cc_test( "//:gpr", "//:grpc", "//test/core/tsi/alts/crypt:alts_crypt_test_util", - "//test/core/util:gpr_test_util", ], ) @@ -56,7 +54,6 @@ grpc_cc_test( "//:tsi_interface", "//test/core/tsi/alts/crypt:alts_crypt_test_util", "//test/core/tsi:transport_security_test_lib", - "//test/core/util:gpr_test_util", ], ) @@ -70,6 +67,5 @@ grpc_cc_test( "//:gpr_base", "//:grpc", "//test/core/tsi/alts/crypt:alts_crypt_test_util", - "//test/core/util:gpr_test_util", ], ) diff --git a/test/core/tsi/alts/handshaker/BUILD b/test/core/tsi/alts/handshaker/BUILD index 3f1a681c1a..809742744c 100644 --- a/test/core/tsi/alts/handshaker/BUILD +++ b/test/core/tsi/alts/handshaker/BUILD @@ -37,7 +37,6 @@ grpc_cc_test( "//:tsi", "//:tsi_interface", "//:grpc", - "//test/core/util:gpr_test_util", ], ) @@ -48,7 +47,6 @@ grpc_cc_test( deps = [ ":alts_handshaker_service_api_test_lib", "//:grpc", - "//test/core/util:gpr_test_util", ], ) @@ -62,7 +60,6 @@ grpc_cc_test( "//:gpr_base", "//:grpc", "//:tsi", - "//test/core/util:gpr_test_util", ], ) @@ -74,7 +71,6 @@ grpc_cc_test( ":alts_handshaker_service_api_test_lib", "//:grpc", "//:tsi", - "//test/core/util:gpr_test_util", ], ) @@ -85,7 +81,6 @@ grpc_cc_test( deps = [ "//:alts_util", "//:grpc", - "//test/core/util:gpr_test_util", ], ) diff --git a/test/core/tsi/alts/zero_copy_frame_protector/BUILD b/test/core/tsi/alts/zero_copy_frame_protector/BUILD index a3b797327e..2b41dae043 100644 --- a/test/core/tsi/alts/zero_copy_frame_protector/BUILD +++ b/test/core/tsi/alts/zero_copy_frame_protector/BUILD @@ -28,7 +28,6 @@ grpc_cc_test( "//:grpc", "//:grpc_base_c", "//test/core/tsi/alts/crypt:alts_crypt_test_util", - "//test/core/util:gpr_test_util", ], ) @@ -41,7 +40,6 @@ grpc_cc_test( "//:gpr", "//:grpc", "//test/core/tsi/alts/crypt:alts_crypt_test_util", - "//test/core/util:gpr_test_util", ], ) @@ -55,6 +53,5 @@ grpc_cc_test( "//:grpc", "//:grpc_base_c", "//test/core/tsi/alts/crypt:alts_crypt_test_util", - "//test/core/util:gpr_test_util", ], ) diff --git a/test/core/util/BUILD b/test/core/util/BUILD index be3e204777..f52570cde5 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -32,11 +32,6 @@ grpc_cc_library( "test_config.h", ], deps = ["//:gpr"], - data = [ - "//tools:lsan_suppressions.txt", - "//tools:tsan_suppressions.txt", - "//tools:ubsan_suppressions.txt", - ], ) grpc_cc_library( |