mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
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 <fromani@redhat.com>
This commit is contained in:
parent
1151dc1ee5
commit
c69ad8c57a
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user