From 96bba93b8295457f1db2280eb76e8c7e4565fa1d Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Mon, 4 Aug 2025 00:24:14 +0000 Subject: [PATCH] fix: ignore goroutine leak for protocol lookup on windows --- testutil/goleak.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testutil/goleak.go b/testutil/goleak.go index e93c46a04c5f0..ae4ad3e273425 100644 --- a/testutil/goleak.go +++ b/testutil/goleak.go @@ -5,6 +5,9 @@ import "go.uber.org/goleak" // GoleakOptions is a common list of options to pass to goleak. This is useful if there is a known // leaky function we want to exclude from goleak. var GoleakOptions []goleak.Option = []goleak.Option{ + // Go spawns a goroutine to lookup the protocol when run on + // windows. See https://go.dev/src/net/lookup_windows.go#L56 + goleak.IgnoreAnyFunction("net.lookupProtocol.func1"), // seelog (indirect dependency of dd-trace-go) has a known goroutine leak (https://github.com/cihub/seelog/issues/182) // When https://github.com/DataDog/dd-trace-go/issues/2987 is resolved, this can be removed. goleak.IgnoreAnyFunction("github.com/cihub/seelog.(*asyncLoopLogger).processQueue"),