Skip to content

Commit

Permalink
fix flaky goroutine leak detection test
Browse files Browse the repository at this point in the history
  • Loading branch information
thediveo committed May 4, 2022
1 parent e77ea75 commit be67644
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gleak/have_leaked_matcher_test.go
Expand Up @@ -77,7 +77,8 @@ created by main.foo`,
})

It("considers testing and runtime goroutines not to be leaks", func() {
Expect(Goroutines()).NotTo(HaveLeaked(), "should not find any leaks by default")
Eventually(Goroutines()).WithTimeout(2*time.Second).WithPolling(250*time.Millisecond).
ShouldNot(HaveLeaked(), "should not find any leaks by default")
})

When("using signals", func() {
Expand Down

0 comments on commit be67644

Please sign in to comment.