Merge pull request #130115 from danmillwood/danmillwood-dispatcher-test-patch

Fix intermittent failure in TestDispatcher test

Kubernetes-commit: f287bc21b731ce31375a3c2348404ef8a199698e
This commit is contained in:
Kubernetes Publisher 2025-03-18 20:34:01 -07:00
commit 2566cd2659
1 changed files with 1 additions and 1 deletions

View File

@ -656,8 +656,8 @@ func TestDispatcher(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
informerFactory.WaitForCacheSync(ctx.Done())
informerFactory.Start(ctx.Done()) informerFactory.Start(ctx.Done())
informerFactory.WaitForCacheSync(ctx.Done())
for i, h := range tc.policyHooks { for i, h := range tc.policyHooks {
tc.policyHooks[i].ParamInformer = paramInformer tc.policyHooks[i].ParamInformer = paramInformer
tc.policyHooks[i].ParamScope = testParamScope{} tc.policyHooks[i].ParamScope = testParamScope{}