Merge pull request #44760 from tsmetana/issue44757

Fix issue #44757: Flaky Test_AttachDetachControllerRecovery
This commit is contained in:
Wojciech Tyczynski 2017-04-21 14:36:06 +02:00 committed by GitHub
commit a0418d01ac

View File

@ -168,6 +168,12 @@ func attachDetachRecoveryTestCase(t *testing.T, extraPods1 []*v1.Pod, extraPods2
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
i = 0
nodeList, err := informerFactory.Core().V1().Nodes().Lister().List(labels.Everything())