diff --git a/leaks.go b/leaks.go index 61bc92d..ccb50b4 100644 --- a/leaks.go +++ b/leaks.go @@ -85,6 +85,12 @@ type testHelper interface { // tests by doing: // // defer VerifyNone(t) +// +// VerifyNone is currently incompatible with t.Parallel because it cannot +// associate specific goroutines with specific tests. Thus, non-leaking +// goroutines from other tests running in parallel could fail this check. +// If you need to run tests in parallel, use [VerifyTestMain] instead, +// which will verify that no leaking goroutines exist after ALL tests finish. func VerifyNone(t TestingT, options ...Option) { opts := buildOpts(options...) var cleanup func(int)