Skip to content

Commit

Permalink
Add constant PodReadyTimeout to e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
heyste authored and hh committed Nov 6, 2020
1 parent 079764e commit 36f4527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/common/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 36f4527

Please sign in to comment.