diff --git a/test/e2e/common/node/runtimeclass.go b/test/e2e/common/node/runtimeclass.go index 22e8c9311a3..79f0dd68582 100644 --- a/test/e2e/common/node/runtimeclass.go +++ b/test/e2e/common/node/runtimeclass.go @@ -164,7 +164,7 @@ var _ = SIGDescribe("RuntimeClass", func() { framework.ExpectNoError(err, "failed to delete RuntimeClass %s", rcName) ginkgo.By("Waiting for the RuntimeClass to disappear") - framework.ExpectNoError(wait.PollImmediate(framework.Poll, time.Minute, func() (bool, error) { + framework.ExpectNoError(wait.PollUntilContextTimeout(ctx, framework.Poll, time.Minute, true, func(ctx context.Context) (bool, error) { _, err := rcClient.Get(ctx, rcName, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return true, nil // done