Skip to content

Commit 3d9ec65

Browse files
committed
🌱 Give more time for prow / goroutine leak test
Signed-off-by: Vince Prignano <[email protected]>
1 parent e1ced80 commit 3d9ec65

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/controller/controller_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package controller_test
1919
import (
2020
"fmt"
2121
rt "runtime"
22+
"time"
2223

2324
. "github.com/onsi/ginkgo"
2425
. "github.com/onsi/gomega"
@@ -109,10 +110,10 @@ var _ = Describe("controller.Controller", func() {
109110
close(s)
110111

111112
Expect(m.Start(s)).NotTo(HaveOccurred())
112-
Expect(rt.NumGoroutine() - startGoroutines).To(BeNumerically("<=", threshold))
113+
Eventually(rt.NumGoroutine()-startGoroutines, 10*time.Second).Should(BeNumerically("<=", threshold))
113114

114115
close(done)
115-
})
116+
}, 20)
116117
})
117118
})
118119

pkg/manager/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ var _ = Describe("manger.Manager", func() {
11831183
Expect(m.Start(s)).NotTo(HaveOccurred())
11841184

11851185
_ = pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)
1186-
Expect(rt.NumGoroutine() - startGoruntime).To(BeNumerically("<=", threshold))
1186+
Eventually(rt.NumGoroutine()-startGoruntime, 10*time.Second).Should(BeNumerically("<=", threshold))
11871187
close(done)
11881188
})
11891189

0 commit comments

Comments
 (0)