Fix e2e test flakes

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-12-12 23:07:50 -03:00
parent bcdd975025
commit c2550930b1
6 changed files with 57 additions and 40 deletions

View file

@ -73,11 +73,10 @@ func (f *Framework) NewNewFastCGIHelloServerDeploymentWithReplicas(replicas int3
},
}
d, err := f.EnsureDeployment(deployment)
Expect(err).NotTo(HaveOccurred())
d := f.EnsureDeployment(deployment)
Expect(d).NotTo(BeNil(), "expected a fastcgi-helloserver deployment")
err = WaitForPodsReady(f.KubeClientSet, DefaultTimeout, int(replicas), f.Namespace, metav1.ListOptions{
err := WaitForPodsReady(f.KubeClientSet, DefaultTimeout, int(replicas), f.Namespace, metav1.ListOptions{
LabelSelector: fields.SelectorFromSet(fields.Set(d.Spec.Template.ObjectMeta.Labels)).String(),
})
Expect(err).NotTo(HaveOccurred(), "failed to wait for to become ready")