From 197fec8c8a22ace9ba8caf32470632f047b1eaa7 Mon Sep 17 00:00:00 2001 From: Sotiris Salloumis Date: Wed, 18 Sep 2024 17:29:31 +0200 Subject: [PATCH] Deflake "RuntimeClass should reject a Pod requesting a deleted RuntimeClass" test Test today uses deprecated method PollImmediate, which does not return errors from context, this commit tries to fix this using instead PollUntilContextTimeout. --- test/e2e/common/node/runtimeclass.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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