Another attempt to fix problem with not ready endpoints in autoscaling e2e

pull/6/head
Piotr Szczesniak 2015-09-25 10:16:03 +02:00
parent e37e48e9f7
commit b2cc7d0ac0
2 changed files with 5 additions and 3 deletions

View File

@ -57,7 +57,7 @@ var _ = Describe("Autoscaling", func() {
// Consume 60% CPU
millicoresPerReplica := 600
rc := NewStaticResourceConsumer("rc", nodeCount*coresPerNode, millicoresPerReplica*nodeCount*coresPerNode, 0, int64(millicoresPerReplica), 100, f)
rc := NewStaticResourceConsumer("cpu-utilization", nodeCount*coresPerNode, millicoresPerReplica*nodeCount*coresPerNode, 0, int64(millicoresPerReplica), 100, f)
expectNoError(waitForClusterSize(f.Client, nodeCount+1, 20*time.Minute))
rc.CleanUp()
@ -79,7 +79,7 @@ var _ = Describe("Autoscaling", func() {
// Consume 60% of total memory capacity
megabytesPerReplica := int(memCapacityMb * 6 / 10 / coresPerNode)
rc := NewStaticResourceConsumer("rc", nodeCount*coresPerNode, 0, megabytesPerReplica*nodeCount*coresPerNode, 100, int64(megabytesPerReplica+100), f)
rc := NewStaticResourceConsumer("mem-utilization", nodeCount*coresPerNode, 0, megabytesPerReplica*nodeCount*coresPerNode, 100, int64(megabytesPerReplica+100), f)
expectNoError(waitForClusterSize(f.Client, nodeCount+1, 20*time.Minute))
rc.CleanUp()

View File

@ -250,7 +250,6 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
},
})
expectNoError(err)
expectNoError(waitForService(c, ns, name, true, startServiceInterval, startServiceTimeout))
config := RCConfig{
Client: c,
Image: image,
@ -262,4 +261,7 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
MemLimit: memLimitMb * 1024 * 1024, // MemLimit is in bytes
}
expectNoError(RunRC(config))
// Make sure endpoints are propagated.
// TODO(piosz): replace sleep with endpoints watch.
time.Sleep(10 * time.Second)
}