From e4106e305a41411146e1d5b05c5477081a424024 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 28 Apr 2017 14:09:26 -0700 Subject: [PATCH] Increase pv test ns deletion timeout to the framework's default. --- test/e2e/framework/framework.go | 5 +++-- test/e2e/storage/persistent_volumes-gce.go | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 264c4aa7a36..bb1ab2c5d85 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -53,7 +53,8 @@ import ( ) const ( - maxKubectlExecRetries = 5 + maxKubectlExecRetries = 5 + DefaultNamespaceDeletionTimeout = 5 * time.Minute ) // Framework supports common operations used by e2e tests; it will keep a client & a namespace for you. @@ -244,7 +245,7 @@ func (f *Framework) AfterEach() { if TestContext.DeleteNamespace && (TestContext.DeleteNamespaceOnFailure || !CurrentGinkgoTestDescription().Failed) { for _, ns := range f.namespacesToDelete { By(fmt.Sprintf("Destroying namespace %q for this suite.", ns.Name)) - timeout := 5 * time.Minute + timeout := DefaultNamespaceDeletionTimeout if f.NamespaceDeletionTimeout != 0 { timeout = f.NamespaceDeletionTimeout } diff --git a/test/e2e/storage/persistent_volumes-gce.go b/test/e2e/storage/persistent_volumes-gce.go index 549d3d9c4c2..0b2e7daf1aa 100644 --- a/test/e2e/storage/persistent_volumes-gce.go +++ b/test/e2e/storage/persistent_volumes-gce.go @@ -17,8 +17,6 @@ limitations under the License. package storage import ( - "time" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -155,7 +153,7 @@ var _ = framework.KubeDescribe("PersistentVolumes:GCEPD [Volume]", func() { err := c.CoreV1().Namespaces().Delete(ns, nil) Expect(err).NotTo(HaveOccurred()) - err = framework.WaitForNamespacesDeleted(c, []string{ns}, 3*time.Minute) + err = framework.WaitForNamespacesDeleted(c, []string{ns}, framework.DefaultNamespaceDeletionTimeout) Expect(err).NotTo(HaveOccurred()) By("Verifying Persistent Disk detaches")