User code go test should pass without the workaround of goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"))
What did you see instead?
[Goroutine 51 in state chan receive, with github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1 on top of the stack:
goroutine 51 [chan receive]:
github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1()
external/io_bazel_rules_go/go/tools/bzltestutil/timeout.go:43 +0x24
created by github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler in goroutine 1
external/io_bazel_rules_go/go/tools/bzltestutil/timeout.go:42 +0x98
]
What version of rules_go are you using?
v0.49.0
What version of gazelle are you using?
v0.37.0
What version of Bazel are you using?
5.4.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Darwin arm64
Any other potentially useful information about your toolchain?
What did you do?
Go tests that do not send SIGTERM or do not timeout will fail goleak check because this go func waiting to receive SIGTERM
https://github.com/bazelbuild/rules_go/blob/86a7f025d2fc052ab6154603b481cb7e4419598f/go/tools/bzltestutil/timeout.go#L40-L44
What did you expect to see?
User code go test should pass without the workaround of
goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"))
What did you see instead?