Skip to content

Commit

Permalink
Remove race condition from templated StartTestManager
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneutt committed Jan 18, 2019
1 parent cb3a7e0 commit ffe210e
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 ffe210e

Please sign in to comment.