mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
chore(Job): use WaitForCacheSync method after sharedInformerFactory Start
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user