Skip to content

Commit

Permalink
Remove race condition in templated controller test
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneutt committed Jan 21, 2019
1 parent cb3a7e0 commit 0df2b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scaffold/controller/controllersuitetest.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ func SetupTestReconcile(inner reconcile.Reconciler) (reconcile.Reconciler, chan
func StartTestManager(mgr manager.Manager, g *gomega.GomegaWithT) (chan struct{}, *sync.WaitGroup) {
stop := make(chan struct{})
wg := &sync.WaitGroup{}
wg.Add(1)
go func() {
wg.Add(1)
defer wg.Done()
g.Expect(mgr.Start(stop)).NotTo(gomega.HaveOccurred())
wg.Done()
}()
return stop, wg
}
Expand Down

0 comments on commit 0df2b10

Please sign in to comment.