mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
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.
This commit is contained in:
parent
92507eaabe
commit
197fec8c8a
@ -164,7 +164,7 @@ var _ = SIGDescribe("RuntimeClass", func() {
|
|||||||
framework.ExpectNoError(err, "failed to delete RuntimeClass %s", rcName)
|
framework.ExpectNoError(err, "failed to delete RuntimeClass %s", rcName)
|
||||||
|
|
||||||
ginkgo.By("Waiting for the RuntimeClass to disappear")
|
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{})
|
_, err := rcClient.Get(ctx, rcName, metav1.GetOptions{})
|
||||||
if apierrors.IsNotFound(err) {
|
if apierrors.IsNotFound(err) {
|
||||||
return true, nil // done
|
return true, nil // done
|
||||||
|
Loading…
Reference in New Issue
Block a user