From 397ef496bc181a63a47f387e6e1da5a58f6ac5ec Mon Sep 17 00:00:00 2001 From: Siyu Wang Date: Thu, 11 Nov 2021 00:33:20 +0800 Subject: [PATCH] Fix e2e failure for pulling image (#802) Signed-off-by: FillZpp --- test/e2e/apps/pullimages.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/e2e/apps/pullimages.go b/test/e2e/apps/pullimages.go index 17f42ecab8..95d28a7cad 100644 --- a/test/e2e/apps/pullimages.go +++ b/test/e2e/apps/pullimages.go @@ -132,9 +132,11 @@ var _ = SIGDescribe("PullImage", func() { }, 25*time.Second, 2*time.Second).Should(gomega.Equal(true)) ginkgo.By("Check image should be cleaned in NodeImage") - found, err := testerForNodeImage.IsImageInSpec(job.Spec.Image, nodes[0].Name) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(found).To(gomega.Equal(false)) + gomega.Eventually(func() bool { + found, err := testerForNodeImage.IsImageInSpec(job.Spec.Image, nodes[0].Name) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + return found + }, 10*time.Second, time.Second).Should(gomega.Equal(false)) }) ginkgo.It("create an always job to pull an image on one real node", func() {