mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #121583 from bzsuni/fix/e2e/apimachinery
Fix the e2e bug related to the Garbage collector in api-machinery
This commit is contained in:
commit
edb39d703b
@ -1101,14 +1101,11 @@ var _ = SIGDescribe("Garbage collector", func() {
|
|||||||
framework.Failf("timeout in waiting for the owner to be deleted: %v", err)
|
framework.Failf("timeout in waiting for the owner to be deleted: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait 30s and ensure the dependent is not deleted.
|
timeout := 30*time.Second + gcInformerResyncRetryTimeout
|
||||||
ginkgo.By("wait for 30 seconds to see if the garbage collector mistakenly deletes the dependent crd")
|
ginkgo.By(fmt.Sprintf("wait for %s to see if the garbage collector mistakenly deletes the dependent crd\n", timeout))
|
||||||
if err := wait.PollWithContext(ctx, 5*time.Second, 30*time.Second+gcInformerResyncRetryTimeout, func(ctx context.Context) (bool, error) {
|
gomega.Consistently(ctx, framework.HandleRetry(func(ctx context.Context) (*unstructured.Unstructured, error) {
|
||||||
_, err := resourceClient.Get(ctx, dependentName, metav1.GetOptions{})
|
return resourceClient.Get(ctx, dependentName, metav1.GetOptions{})
|
||||||
return false, err
|
})).WithTimeout(timeout).WithPolling(5 * time.Second).ShouldNot(gomega.BeNil())
|
||||||
}); err != nil && !wait.Interrupted(err) {
|
|
||||||
framework.Failf("failed to ensure the dependent is not deleted: %v", err)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
ginkgo.It("should delete jobs and pods created by cronjob", func(ctx context.Context) {
|
ginkgo.It("should delete jobs and pods created by cronjob", func(ctx context.Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user