StatefulSet: Use synchronous Delete of SS in e2e.

This is needed because we changed the default for SS to
OrphanDependents.
This commit is contained in:
Anthony Yeh 2017-03-03 14:39:25 -08:00
parent 6679a5a31f
commit d8a0017559
1 changed files with 3 additions and 1 deletions

View File

@ -408,7 +408,9 @@ func DeleteAllStatefulSets(c clientset.Interface, ns string) {
}
sst.WaitForStatus(&ss, 0)
Logf("Deleting statefulset %v", ss.Name)
if err := c.Apps().StatefulSets(ss.Namespace).Delete(ss.Name, nil); err != nil {
// Use OrphanDependents=false so it's deleted synchronously.
// We already made sure the Pods are gone inside Scale().
if err := c.Apps().StatefulSets(ss.Namespace).Delete(ss.Name, &metav1.DeleteOptions{OrphanDependents: new(bool)}); err != nil {
errList = append(errList, fmt.Sprintf("%v", err))
}
}