Skip to content

Commit f167ca4

Browse files
committed
[tmp] debugging on CI
1 parent 8f27f95 commit f167ca4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/controller/controller_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ package controller_test
1919
import (
2020
"fmt"
2121
rt "runtime"
22+
"runtime/pprof"
23+
"os"
2224

2325
. "github.com/onsi/ginkgo"
2426
. "github.com/onsi/gomega"
@@ -113,13 +115,15 @@ var _ = Describe("controller.Controller", func() {
113115

114116
It("should not create goroutines if never started", func() {
115117
startGoroutines := rt.NumGoroutine()
118+
Expect(pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)).To(Succeed())
116119

117120
m, err := manager.New(cfg, manager.Options{})
118121
Expect(err).NotTo(HaveOccurred())
119122

120123
_, err = controller.New("new-controller", m, controller.Options{Reconciler: rec})
121124
Expect(err).NotTo(HaveOccurred())
122125

126+
Expect(pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)).To(Succeed())
123127
Expect(rt.NumGoroutine()).To(Equal(startGoroutines))
124128
})
125129
})

0 commit comments

Comments
 (0)