Add constant PodReadyTimeout to e2e test

This commit is contained in:
Stephen Heywood 2020-11-06 10:51:38 +13:00 committed by Hippie Hacker
parent 079764ebd5
commit 36f4527956

View File

@ -59,6 +59,7 @@ const (
maxBackOffTolerance = time.Duration(1.3 * float64(kubelet.MaxContainerBackOff))
podRetryPeriod = 1 * time.Second
podRetryTimeout = 1 * time.Minute
podReadyTimeout = 1 * time.Minute
)
// testHostIP tests that a pod gets a host IP
@ -922,7 +923,7 @@ var _ = framework.KubeDescribe("Pods", func() {
framework.ExpectNoError(err, "failed to create Pod %v in namespace %v", testPod.ObjectMeta.Name, testNamespaceName)
ginkgo.By("watching for Pod to be ready")
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), podReadyTimeout)
defer cancel()
_, err = watchtools.Until(ctx, podsList.ResourceVersion, w, func(event watch.Event) (bool, error) {
if pod, ok := event.Object.(*v1.Pod); ok {