Fix flaking e2e tests

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-01-05 11:15:38 -03:00
parent 9c0061f482
commit 2af6305a4f
9 changed files with 21 additions and 13 deletions

View file

@ -423,7 +423,8 @@ func (f *Framework) ScaleDeploymentToZero(name string) {
Expect(d).NotTo(BeNil(), "expected a deployment but none returned")
d.Spec.Replicas = NewInt32(0)
f.EnsureDeployment(d)
d = f.EnsureDeployment(d)
Expect(d).NotTo(BeNil(), "expected a deployment but none returned")
err = WaitForEndpoints(f.KubeClientSet, DefaultTimeout, name, f.Namespace, 0)
Expect(err).NotTo(HaveOccurred(), "failed to wait for no endpoints")
}