CronJob: Use synchronous deletion for CronJobs in e2e.

This is needed now that the default is OrphanDependents.
This commit is contained in:
Anthony Yeh 2017-03-03 14:59:06 -08:00
parent 4e682fdaa4
commit 5cef455a0d

View File

@ -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)
}