From c69ad8c57a36a2435b963f9c2b90c1a26ca8a300 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Wed, 16 Jun 2021 17:14:39 +0200 Subject: [PATCH] e2e: increase readiness gate timeout We're trying to fix https://github.com/kubernetes/kubernetes/issues/75355 sicne long time, and we believe the current timeout could actually be too low (despite being "forever", which is 30s). To validate this theory, we set the timeout to one full minute. Also, make the logging more verbose to make the troubleshooting easier. Signed-off-by: Francesco Romani --- test/e2e/common/node/pods.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/e2e/common/node/pods.go b/test/e2e/common/node/pods.go index a731a4573db..5c45469c99a 100644 --- a/test/e2e/common/node/pods.go +++ b/test/e2e/common/node/pods.go @@ -42,6 +42,7 @@ import ( "k8s.io/client-go/dynamic" "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" + "k8s.io/kubectl/pkg/util/podutils" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/kubelet" "k8s.io/kubernetes/test/e2e/framework" @@ -800,11 +801,13 @@ var _ = SIGDescribe("Pods", func() { } validatePodReadiness := func(expectReady bool) { - err := wait.Poll(time.Second, wait.ForeverTestTimeout, func() (bool, error) { - podReady := podClient.PodIsReady(podName) + err := wait.Poll(time.Second, time.Minute, func() (bool, error) { + pod, err := podClient.Get(context.TODO(), podName, metav1.GetOptions{}) + framework.ExpectNoError(err) + podReady := podutils.IsPodReady(pod) res := expectReady == podReady if !res { - framework.Logf("Expect the Ready condition of pod %q to be %v, but got %v", podName, expectReady, podReady) + framework.Logf("Expect the Ready condition of pod %q to be %v, but got %v (pod status %#v)", podName, expectReady, podReady, pod.Status) } return res, nil })