Closed advdv closed 5 months ago
I see this case is explicitly mentioned in the docs: https://onsi.github.io/gomega/#well-known-non-leaky-goroutines
And since I'm not using I'll close this issue:
BeforeEach(func() {
goods := Goroutines()
DeferCleanup(func() {
Eventually(Goroutines).ShouldNot(HaveLeaked(goods))
})
})
Hi @advdv. I think it's worth adding that t.Parallel()
won't have the effect of making Ginkgo tests run in parallel. Ginkgo runs tests in parallel by running separate processes started by the ginkgo
command. The t.Parallel()
setting allows Go func Test...(*testing.T)
style tests to run in parallel using Goroutines. Why the difference? Ginkgo was written long before the t.Parallel()
setting was added, and it's hard to retrofit Ginkgo to work using the same model as it would break many existing tests.
I'm on Go version
go version go1.22.3 darwin/arm64
and when I create a test like this:And run
ginkgo
without any other arguments it will fail with:It seems to be because of t.Parallel. Since this is a standard library function it might be reasonable to add this to the standard ignores that gleak has?