Increase pv test ns deletion timeout to the framework's default.

pull/6/head
Michelle Au 2017-04-28 14:09:26 -07:00
parent 13b7c95f48
commit e4106e305a
2 changed files with 4 additions and 5 deletions

View File

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

View File

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