Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package controller_test
import (
"fmt"
rt "runtime"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -109,10 +110,10 @@ var _ = Describe("controller.Controller", func() {
close(s)

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

close(done)
})
}, 20)
})
})

Expand Down
4 changes: 2 additions & 2 deletions pkg/manager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1183,9 +1183,9 @@ var _ = Describe("manger.Manager", func() {
Expect(m.Start(s)).NotTo(HaveOccurred())

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

It("should provide a function to get the Config", func() {
m, err := New(cfg, Options{})
Expand Down