From 48f67b9656c97fbbbb90562c06628c7418a7ebb4 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 23 Jan 2026 18:18:29 -0500 Subject: [PATCH] Add timeout to ImagePullTest poll loop to prevent infinite hangs ImagePullTest was using wait.PollUntilContextCancel which has no timeout, causing tests to hang for hours when the expected container state is never reached (e.g., ErrImageNeverPull). Changed to wait.PollUntilContextTimeout with ContainerStatusRetryTimeout (5 minutes), matching the pattern used by other tests in the same file. Signed-off-by: Davanum Srinivas --- test/e2e/common/node/runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/common/node/runtime.go b/test/e2e/common/node/runtime.go index e455e0c1bb4..ec5bc38e3cb 100644 --- a/test/e2e/common/node/runtime.go +++ b/test/e2e/common/node/runtime.go @@ -376,7 +376,7 @@ func ImagePullTest(ctx context.Context, f *framework.Framework, image string, im ginkgo.By("check the container status") var latestErr error - err := wait.PollUntilContextCancel(ctx, ContainerStatusPollInterval, true, func(ctx context.Context) (bool, error) { + err := wait.PollUntilContextTimeout(ctx, ContainerStatusPollInterval, ContainerStatusRetryTimeout, true, func(ctx context.Context) (bool, error) { if latestErr = checkContainerStatus(ctx); latestErr != nil { return false, nil }