From 4631fd0674c3c55fba9bd176f8c4100cca724fdf Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Tue, 8 Aug 2023 03:04:08 +0000 Subject: [PATCH] chore: disable goleak in windows cli tests --- cli/root_internal_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/root_internal_test.go b/cli/root_internal_test.go index e8c463e95cc90..2d99ab8247518 100644 --- a/cli/root_internal_test.go +++ b/cli/root_internal_test.go @@ -1,6 +1,8 @@ package cli import ( + "os" + "runtime" "testing" "github.com/stretchr/testify/require" @@ -67,6 +69,11 @@ func Test_formatExamples(t *testing.T) { } func TestMain(m *testing.M) { + if runtime.GOOS == "windows" { + // Don't run goleak on windows tests, they're super flaky right now. + // See: https://github.com/coder/coder/issues/8954 + os.Exit(m.Run()) + } goleak.VerifyTestMain(m, // The lumberjack library is used by by agent and seems to leave // goroutines after Close(), fails TestGitSSH tests.