Slightly speedup density test

This commit is contained in:
Wojciech Tyczynski 2017-02-21 13:26:03 +01:00
parent 8e80b1e6d6
commit 70e8c9cb89
2 changed files with 9 additions and 3 deletions

View File

@ -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() {

View File

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