Merge pull request #102921 from fromanirh/pod-readiness-gate-timeout
e2e: increase readiness gate timeout
This commit is contained in:
commit
f6c2068623
@ -43,6 +43,7 @@ import (
|
|||||||
"k8s.io/client-go/dynamic"
|
"k8s.io/client-go/dynamic"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
watchtools "k8s.io/client-go/tools/watch"
|
watchtools "k8s.io/client-go/tools/watch"
|
||||||
|
"k8s.io/kubectl/pkg/util/podutils"
|
||||||
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
|
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
|
||||||
"k8s.io/kubernetes/pkg/kubelet"
|
"k8s.io/kubernetes/pkg/kubelet"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
@ -801,11 +802,13 @@ var _ = SIGDescribe("Pods", func() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
validatePodReadiness := func(expectReady bool) {
|
validatePodReadiness := func(expectReady bool) {
|
||||||
err := wait.Poll(time.Second, wait.ForeverTestTimeout, func() (bool, error) {
|
err := wait.Poll(time.Second, time.Minute, func() (bool, error) {
|
||||||
podReady := podClient.PodIsReady(podName)
|
pod, err := podClient.Get(context.TODO(), podName, metav1.GetOptions{})
|
||||||
|
framework.ExpectNoError(err)
|
||||||
|
podReady := podutils.IsPodReady(pod)
|
||||||
res := expectReady == podReady
|
res := expectReady == podReady
|
||||||
if !res {
|
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
|
return res, nil
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user