From f6090185a803f387debdcf2ea0124289975c890d Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Fri, 14 Feb 2025 13:07:08 +0200 Subject: [PATCH] e2e: fix node conformance flake The test `Pods should support retriving logs from the container over websockets` flakes as it doesn't always wait until container is running and is able to produce expected output. Waiting for pod to be in the `Running` state is not enough as it doesn't mean that container is running. Waiting for container to be in `Running` state should fix the test. --- test/e2e/common/node/pods.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/common/node/pods.go b/test/e2e/common/node/pods.go index 3e59de4e28e..31eed98d661 100644 --- a/test/e2e/common/node/pods.go +++ b/test/e2e/common/node/pods.go @@ -638,7 +638,11 @@ var _ = SIGDescribe("Pods", func() { }) ginkgo.By("submitting the pod to kubernetes") - podClient.CreateSync(ctx, pod) + pod = podClient.CreateSync(ctx, pod) + + ginkgo.By("waiting for the container to be running") + err = e2epod.WaitForContainerRunning(ctx, f.ClientSet, pod.Namespace, pod.Name, pod.Spec.Containers[0].Name, framework.PodStartShortTimeout) + framework.ExpectNoError(err, "failed to wait for container to be running") req := f.ClientSet.CoreV1().RESTClient().Get(). Namespace(f.Namespace.Name).