mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
chore(Job): use WaitForCacheSync method after sharedInformerFactory Start
This commit is contained in:
parent
01eb9f4754
commit
af5b8bed70
@ -6449,6 +6449,7 @@ func TestWatchJobs(t *testing.T) {
|
|||||||
stopCh := make(chan struct{})
|
stopCh := make(chan struct{})
|
||||||
defer close(stopCh)
|
defer close(stopCh)
|
||||||
sharedInformerFactory.Start(stopCh)
|
sharedInformerFactory.Start(stopCh)
|
||||||
|
sharedInformerFactory.WaitForCacheSync(stopCh)
|
||||||
go manager.Run(ctx, 1)
|
go manager.Run(ctx, 1)
|
||||||
|
|
||||||
// We're sending new job to see if it reaches syncHandler.
|
// We're sending new job to see if it reaches syncHandler.
|
||||||
|
Loading…
Reference in New Issue
Block a user