Skip to content

Commit f609018

Browse files
committed
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.
1 parent 2642d82 commit f609018

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e/common/node/pods.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,11 @@ var _ = SIGDescribe("Pods", func() {
638638
})
639639

640640
ginkgo.By("submitting the pod to kubernetes")
641-
podClient.CreateSync(ctx, pod)
641+
pod = podClient.CreateSync(ctx, pod)
642+
643+
ginkgo.By("waiting for the container to be running")
644+
err = e2epod.WaitForContainerRunning(ctx, f.ClientSet, pod.Namespace, pod.Name, pod.Spec.Containers[0].Name, framework.PodStartShortTimeout)
645+
framework.ExpectNoError(err, "failed to wait for container to be running")
642646

643647
req := f.ClientSet.CoreV1().RESTClient().Get().
644648
Namespace(f.Namespace.Name).

0 commit comments

Comments
 (0)