@@ -245,7 +245,7 @@ func TestProxyHandle_RequestDeadlineExceeded_GRPC(t *testing.T) {
245
245
246
246
func () {
247
247
// Ensure that tunnels aren't leaked with long-running servers.
248
- defer goleak .VerifyNone (t , goleak .IgnoreCurrent ())
248
+ defer goleak .VerifyNone (t , goleak .IgnoreCurrent (), goleak . IgnoreTopFunction ( "google.golang.org/grpc.(*addrConn).resetTransport" ) )
249
249
250
250
// run test client
251
251
tunnel , err := client .CreateSingleUseGrpcTunnel (context .Background (), ps .FrontAddr (), grpc .WithInsecure ())
@@ -303,7 +303,7 @@ func TestProxyDial_RequestCancelled_GRPC(t *testing.T) {
303
303
304
304
func () {
305
305
// Ensure that tunnels aren't leaked with long-running servers.
306
- defer goleak .VerifyNone (t , goleak .IgnoreCurrent ())
306
+ defer goleak .VerifyNone (t , goleak .IgnoreCurrent (), goleak . IgnoreTopFunction ( "google.golang.org/grpc.(*addrConn).resetTransport" ) )
307
307
308
308
// run test client
309
309
tunnel , err := client .CreateSingleUseGrpcTunnel (context .Background (), ps .FrontAddr (), grpc .WithInsecure ())
@@ -393,7 +393,10 @@ func TestProxyDial_RequestCancelled_Concurrent_GRPC(t *testing.T) {
393
393
}
394
394
395
395
// Ensure that tunnels aren't leaked with long-running servers.
396
- ignoredGoRoutines := goleak .IgnoreCurrent ()
396
+ ignoredGoRoutines := []goleak.Option {
397
+ goleak .IgnoreCurrent (),
398
+ goleak .IgnoreTopFunction ("google.golang.org/grpc.(*addrConn).resetTransport" ),
399
+ }
397
400
398
401
const concurrentConns = 50
399
402
wg .Add (concurrentConns )
@@ -407,7 +410,7 @@ func TestProxyDial_RequestCancelled_Concurrent_GRPC(t *testing.T) {
407
410
var endpointConnsErr , goLeaksErr error
408
411
wait .PollImmediate (time .Second , wait .ForeverTestTimeout , func () (done bool , err error ) {
409
412
endpointConnsErr = metricstest .ExpectAgentEndpointConnections (0 )
410
- goLeaksErr = goleak .Find (ignoredGoRoutines )
413
+ goLeaksErr = goleak .Find (ignoredGoRoutines ... )
411
414
return endpointConnsErr == nil && goLeaksErr == nil , nil
412
415
})
413
416
@@ -433,7 +436,7 @@ func TestProxyDial_AgentTimeout_GRPC(t *testing.T) {
433
436
434
437
func () {
435
438
// Ensure that tunnels aren't leaked with long-running servers.
436
- defer goleak .VerifyNone (t , goleak .IgnoreCurrent ())
439
+ defer goleak .VerifyNone (t , goleak .IgnoreCurrent (), goleak . IgnoreTopFunction ( "google.golang.org/grpc.(*addrConn).resetTransport" ) )
437
440
438
441
// run test client
439
442
tunnel , err := client .CreateSingleUseGrpcTunnel (context .Background (), ps .FrontAddr (), grpc .WithInsecure ())
@@ -929,7 +932,7 @@ func expectCleanShutdown(t testing.TB) {
929
932
resetAllMetrics ()
930
933
currentGoRoutines := goleak .IgnoreCurrent ()
931
934
t .Cleanup (func () {
932
- goleak .VerifyNone (t , currentGoRoutines )
935
+ goleak .VerifyNone (t , currentGoRoutines , goleak . IgnoreTopFunction ( "google.golang.org/grpc.(*addrConn).resetTransport" ) )
933
936
assertNoClientDialFailures (t )
934
937
assertNoServerDialFailures (t )
935
938
assertNoAgentDialFailures (t )
0 commit comments