From 70e8c9cb89fb0a3e5ec8f427676f9efc6126ece9 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Tue, 21 Feb 2017 13:26:03 +0100 Subject: [PATCH] Slightly speedup density test --- test/e2e/density.go | 6 +++++- test/e2e/framework/util.go | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/e2e/density.go b/test/e2e/density.go index 9a959c7755e..636f3d4e194 100644 --- a/test/e2e/density.go +++ b/test/e2e/density.go @@ -339,9 +339,13 @@ var _ = framework.KubeDescribe("Density", func() { } }) + options := framework.FrameworkOptions{ + ClientQPS: 50.0, + ClientBurst: 100, + } // Explicitly put here, to delete namespace at the end of the test // (after measuring latency metrics, etc.). - f := framework.NewDefaultFramework("density") + f := framework.NewFramework("density", options, nil) f.NamespaceDeletionTimeout = time.Hour BeforeEach(func() { diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index dec506c6b7c..f3a1b4dd9f0 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -2782,7 +2782,7 @@ func DeleteResourceAndPods(clientset clientset.Interface, internalClientset inte } deleteTime := time.Now().Sub(startTime) Logf("Deleting %v %s took: %v", kind, name, deleteTime) - err = waitForPodsInactive(ps, 10*time.Millisecond, 10*time.Minute) + err = waitForPodsInactive(ps, 100*time.Millisecond, 10*time.Minute) if err != nil { return fmt.Errorf("error while waiting for pods to become inactive %s: %v", name, err) } @@ -2790,10 +2790,12 @@ func DeleteResourceAndPods(clientset clientset.Interface, internalClientset inte Logf("Terminating %v %s pods took: %v", kind, name, terminatePodTime) // this is to relieve namespace controller's pressure when deleting the // namespace after a test. - err = waitForPodsGone(ps, 10*time.Second, 10*time.Minute) + err = waitForPodsGone(ps, 100*time.Millisecond, 10*time.Minute) if err != nil { return fmt.Errorf("error while waiting for pods gone %s: %v", name, err) } + gcPodTime := time.Now().Sub(startTime) - terminatePodTime + Logf("Garbage collecting %v %s pods took: %v", kind, name, gcPodTime) return nil }