Merge pull request #28043 from mml/fed-grace-period

Automatic merge from submit-queue

Set grace period to 0 when deleting namespaces after the test.

Otherwise, we try to run the next test and the pods are still there.
This commit is contained in:
k8s-merge-robot 2016-06-25 01:16:53 -07:00 committed by GitHub
commit 2bc2cf2e5e

View File

@ -146,8 +146,14 @@ var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func()
AfterEach(func() {
framework.SkipUnlessFederated(f.Client)
// TODO(mml): replace with calls to framework.DeleteNamespaces and
// framework.WaitForNamespacesDeleted. But first we need to re-write
// them to expect versioned clients.
// ALSO TODO(mml): Utility functions like these should [optionally?]
// accept a list of clients/clusters to act upon, to increase
// re-usablity.
for i, cs := range clusterClientSets {
if err := cs.Core().Namespaces().Delete(f.Namespace.Name, &api.DeleteOptions{}); err != nil {
if err := cs.Core().Namespaces().Delete(f.Namespace.Name, api.NewDeleteOptions(0)); err != nil {
framework.Failf("Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err)
}
framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i)