Commit 3064fe4d authored by Tomas Smetana's avatar Tomas Smetana

Fix issue #44757: Flaky Test_AttachDetachControllerRecovery

parent d3b3c311
...@@ -168,6 +168,12 @@ func attachDetachRecoveryTestCase(t *testing.T, extraPods1 []*v1.Pod, extraPods2 ...@@ -168,6 +168,12 @@ func attachDetachRecoveryTestCase(t *testing.T, extraPods1 []*v1.Pod, extraPods2
informerFactory.Start(stopCh) informerFactory.Start(stopCh)
if !controller.WaitForCacheSync("attach detach", stopCh,
informerFactory.Core().V1().Pods().Informer().HasSynced,
informerFactory.Core().V1().Nodes().Informer().HasSynced) {
t.Fatalf("Error waiting for the informer caches to sync")
}
// Make sure the nodes and pods are in the inforer cache // Make sure the nodes and pods are in the inforer cache
i = 0 i = 0
nodeList, err := informerFactory.Core().V1().Nodes().Lister().List(labels.Everything()) nodeList, err := informerFactory.Core().V1().Nodes().Lister().List(labels.Everything())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment