diff --git a/pkg/controller/job/job_controller_test.go b/pkg/controller/job/job_controller_test.go index 699371e68f5..c9f0b8087a6 100644 --- a/pkg/controller/job/job_controller_test.go +++ b/pkg/controller/job/job_controller_test.go @@ -6449,6 +6449,7 @@ func TestWatchJobs(t *testing.T) { stopCh := make(chan struct{}) defer close(stopCh) sharedInformerFactory.Start(stopCh) + sharedInformerFactory.WaitForCacheSync(stopCh) go manager.Run(ctx, 1) // We're sending new job to see if it reaches syncHandler.