From 5cef455a0d002b9614223a527c9a760f75c9a51b Mon Sep 17 00:00:00 2001 From: Anthony Yeh Date: Fri, 3 Mar 2017 14:59:06 -0800 Subject: [PATCH] CronJob: Use synchronous deletion for CronJobs in e2e. This is needed now that the default is OrphanDependents. --- test/e2e/generated_clientset.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/generated_clientset.go b/test/e2e/generated_clientset.go index a7e37c2ae8c..35dba8c9cf9 100644 --- a/test/e2e/generated_clientset.go +++ b/test/e2e/generated_clientset.go @@ -324,7 +324,9 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { observeCreation(w) By("deleting the cronJob") - if err := cronJobClient.Delete(cronJob.Name, nil); err != nil { + // Use DeletePropagationBackground so the CronJob is really gone when the call returns. + propagationPolicy := metav1.DeletePropagationBackground + if err := cronJobClient.Delete(cronJob.Name, &metav1.DeleteOptions{PropagationPolicy: &propagationPolicy}); err != nil { framework.Failf("Failed to delete cronJob: %v", err) }