From 0e5a36b652fecb55a66c79dbe38e5c7889a3d92d Mon Sep 17 00:00:00 2001 From: Jean de Klerk Date: Thu, 7 Jun 2018 16:57:56 -0700 Subject: [PATCH] internal: move leakcheck to internal/ (#2129) internal: move leakcheck to internal/ --- balancer/grpclb/grpclb_test.go | 2 +- balancer/roundrobin/roundrobin_test.go | 2 +- balancer_switching_test.go | 2 +- balancer_test.go | 2 +- call_test.go | 2 +- clientconn_test.go | 2 +- {test => internal}/leakcheck/leakcheck.go | 0 {test => internal}/leakcheck/leakcheck_test.go | 0 picker_wrapper_test.go | 2 +- pickfirst_test.go | 2 +- proxy_test.go | 2 +- resolver/dns/dns_resolver_test.go | 2 +- server_test.go | 2 +- stickiness_test.go | 2 +- test/channelz_test.go | 2 +- test/end2end_test.go | 2 +- test/gracefulstop_test.go | 2 +- 17 files changed, 15 insertions(+), 15 deletions(-) rename {test => internal}/leakcheck/leakcheck.go (100%) rename {test => internal}/leakcheck/leakcheck_test.go (100%) diff --git a/balancer/grpclb/grpclb_test.go b/balancer/grpclb/grpclb_test.go index 18ef82705..0252f4a78 100644 --- a/balancer/grpclb/grpclb_test.go +++ b/balancer/grpclb/grpclb_test.go @@ -38,13 +38,13 @@ import ( lbmpb "google.golang.org/grpc/grpclb/grpc_lb_v1/messages" lbspb "google.golang.org/grpc/grpclb/grpc_lb_v1/service" _ "google.golang.org/grpc/grpclog/glogger" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" "google.golang.org/grpc/status" testpb "google.golang.org/grpc/test/grpc_testing" - "google.golang.org/grpc/test/leakcheck" ) var ( diff --git a/balancer/roundrobin/roundrobin_test.go b/balancer/roundrobin/roundrobin_test.go index 59cac4b1b..70d8af716 100644 --- a/balancer/roundrobin/roundrobin_test.go +++ b/balancer/roundrobin/roundrobin_test.go @@ -30,12 +30,12 @@ import ( "google.golang.org/grpc/balancer/roundrobin" "google.golang.org/grpc/codes" _ "google.golang.org/grpc/grpclog/glogger" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/peer" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" "google.golang.org/grpc/status" testpb "google.golang.org/grpc/test/grpc_testing" - "google.golang.org/grpc/test/leakcheck" ) type testServer struct { diff --git a/balancer_switching_test.go b/balancer_switching_test.go index 7917b3fb7..0dcd9165c 100644 --- a/balancer_switching_test.go +++ b/balancer_switching_test.go @@ -29,9 +29,9 @@ import ( "google.golang.org/grpc/balancer/roundrobin" "google.golang.org/grpc/connectivity" _ "google.golang.org/grpc/grpclog/glogger" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" - "google.golang.org/grpc/test/leakcheck" ) var _ balancer.Builder = &magicalLB{} diff --git a/balancer_test.go b/balancer_test.go index cc7e46dd7..8675e7d5e 100644 --- a/balancer_test.go +++ b/balancer_test.go @@ -29,9 +29,9 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/codes" _ "google.golang.org/grpc/grpclog/glogger" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/naming" "google.golang.org/grpc/status" - "google.golang.org/grpc/test/leakcheck" // V1 balancer tests use passthrough resolver instead of dns. // TODO(bar) remove this when removing v1 balaner entirely. diff --git a/call_test.go b/call_test.go index 38ffc31d3..d57d01e4a 100644 --- a/call_test.go +++ b/call_test.go @@ -31,8 +31,8 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/codes" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/status" - "google.golang.org/grpc/test/leakcheck" "google.golang.org/grpc/transport" ) diff --git a/clientconn_test.go b/clientconn_test.go index 4c5bf8bc8..fd3a2a74d 100644 --- a/clientconn_test.go +++ b/clientconn_test.go @@ -30,12 +30,12 @@ import ( "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/naming" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" _ "google.golang.org/grpc/resolver/passthrough" - "google.golang.org/grpc/test/leakcheck" "google.golang.org/grpc/testdata" ) diff --git a/test/leakcheck/leakcheck.go b/internal/leakcheck/leakcheck.go similarity index 100% rename from test/leakcheck/leakcheck.go rename to internal/leakcheck/leakcheck.go diff --git a/test/leakcheck/leakcheck_test.go b/internal/leakcheck/leakcheck_test.go similarity index 100% rename from test/leakcheck/leakcheck_test.go rename to internal/leakcheck/leakcheck_test.go diff --git a/picker_wrapper_test.go b/picker_wrapper_test.go index 37dffa9e9..d455286d3 100644 --- a/picker_wrapper_test.go +++ b/picker_wrapper_test.go @@ -28,7 +28,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" _ "google.golang.org/grpc/grpclog/glogger" - "google.golang.org/grpc/test/leakcheck" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/transport" ) diff --git a/pickfirst_test.go b/pickfirst_test.go index 9e1fd03df..7f8169f19 100644 --- a/pickfirst_test.go +++ b/pickfirst_test.go @@ -26,10 +26,10 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/codes" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" "google.golang.org/grpc/status" - "google.golang.org/grpc/test/leakcheck" ) func errorDesc(err error) string { diff --git a/proxy_test.go b/proxy_test.go index 8466676c1..7183ba342 100644 --- a/proxy_test.go +++ b/proxy_test.go @@ -30,7 +30,7 @@ import ( "time" "golang.org/x/net/context" - "google.golang.org/grpc/test/leakcheck" + "google.golang.org/grpc/internal/leakcheck" ) const ( diff --git a/resolver/dns/dns_resolver_test.go b/resolver/dns/dns_resolver_test.go index 3e82db677..66c9735f7 100644 --- a/resolver/dns/dns_resolver_test.go +++ b/resolver/dns/dns_resolver_test.go @@ -27,8 +27,8 @@ import ( "testing" "time" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/resolver" - "google.golang.org/grpc/test/leakcheck" ) func TestMain(m *testing.M) { diff --git a/server_test.go b/server_test.go index 2b379f372..77e40b029 100644 --- a/server_test.go +++ b/server_test.go @@ -26,7 +26,7 @@ import ( "time" "golang.org/x/net/context" - "google.golang.org/grpc/test/leakcheck" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/transport" ) diff --git a/stickiness_test.go b/stickiness_test.go index f54720ce5..f625d680b 100644 --- a/stickiness_test.go +++ b/stickiness_test.go @@ -27,10 +27,10 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/balancer/roundrobin" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/metadata" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" - "google.golang.org/grpc/test/leakcheck" ) func TestStickyKeyFromContext(t *testing.T) { diff --git a/test/channelz_test.go b/test/channelz_test.go index ca130ee68..3ab72b053 100644 --- a/test/channelz_test.go +++ b/test/channelz_test.go @@ -31,12 +31,12 @@ import ( _ "google.golang.org/grpc/balancer/grpclb" "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" "google.golang.org/grpc/status" testpb "google.golang.org/grpc/test/grpc_testing" - "google.golang.org/grpc/test/leakcheck" ) func init() { diff --git a/test/end2end_test.go b/test/end2end_test.go index 889930118..ba1d672ed 100644 --- a/test/end2end_test.go +++ b/test/end2end_test.go @@ -56,6 +56,7 @@ import ( healthgrpc "google.golang.org/grpc/health/grpc_health_v1" healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/internal" + "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -66,7 +67,6 @@ import ( "google.golang.org/grpc/status" "google.golang.org/grpc/tap" testpb "google.golang.org/grpc/test/grpc_testing" - "google.golang.org/grpc/test/leakcheck" "google.golang.org/grpc/testdata" ) diff --git a/test/gracefulstop_test.go b/test/gracefulstop_test.go index 7f8b207ba..afef6099f 100644 --- a/test/gracefulstop_test.go +++ b/test/gracefulstop_test.go @@ -28,7 +28,7 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" - "google.golang.org/grpc/test/leakcheck" + "google.golang.org/grpc/internal/leakcheck" testpb "google.golang.org/grpc/test/grpc_testing" )