From 6d614c9c50c31d564d9407e734ff030eeaa76341 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 18 Feb 2021 16:08:59 +0100 Subject: [PATCH] e2e services test pods should wait until they are ready --- test/e2e/network/service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/network/service.go b/test/e2e/network/service.go index c16f6269080..3411c9e61f8 100644 --- a/test/e2e/network/service.go +++ b/test/e2e/network/service.go @@ -2454,6 +2454,8 @@ func createPodOrFail(c clientset.Interface, ns, name string, labels map[string]s _, err := c.CoreV1().Pods(ns).Create(context.TODO(), pod, metav1.CreateOptions{}) framework.ExpectNoError(err, "failed to create pod %s in namespace %s", name, ns) + err = e2epod.WaitTimeoutForPodReadyInNamespace(c, name, ns, framework.PodStartTimeout) + framework.ExpectNoError(err) } // launchHostExecPod launches a hostexec pod in the given namespace and waits @@ -2463,7 +2465,7 @@ func launchHostExecPod(client clientset.Interface, ns, name string) *v1.Pod { hostExecPod := e2epod.NewExecPodSpec(ns, name, true) pod, err := client.CoreV1().Pods(ns).Create(context.TODO(), hostExecPod, metav1.CreateOptions{}) framework.ExpectNoError(err) - err = e2epod.WaitForPodRunningInNamespace(client, pod) + err = e2epod.WaitTimeoutForPodReadyInNamespace(client, name, ns, framework.PodStartTimeout) framework.ExpectNoError(err) return pod }