Add an option to pass client's QPS/burst to e2e framework

This commit is contained in:
gmarek
2016-02-24 16:24:36 +01:00
parent 38a30490ed
commit 110340c467
68 changed files with 102 additions and 87 deletions

View File

@@ -131,19 +131,15 @@ var _ = Describe("Density", func() {
// Explicitly put here, to delete namespace at the end of the test
// (after measuring latency metrics, etc.).framework := NewFramework("density")
framework := NewFramework("density")
options := FrameworkOptions{
clientQPS: 20,
clientBurst: 30,
}
framework := NewFramework("density", options)
framework.NamespaceDeletionTimeout = time.Hour
BeforeEach(func() {
// Explicitly create a client with higher QPS limits.
// However, make those at most comparable to components.
config, err := loadConfig()
Expect(err).NotTo(HaveOccurred())
config.QPS = 20
config.Burst = 30
c, err = loadClientFromConfig(config)
Expect(err).NotTo(HaveOccurred())
c = framework.Client
ns = framework.Namespace.Name
nodes := ListSchedulableNodesOrDie(c)
@@ -153,7 +149,7 @@ var _ = Describe("Density", func() {
// Terminating a namespace (deleting the remaining objects from it - which
// generally means events) can affect the current run. Thus we wait for all
// terminating namespace to be finally deleted before starting this test.
err = checkTestingNSDeletedExcept(c, ns)
err := checkTestingNSDeletedExcept(c, ns)
expectNoError(err)
uuid = string(util.NewUUID())