Increase timeouts in multiple node pool e2e tests for cluster autoscaler

pull/6/head
Marcin Wielgus 2016-07-04 14:10:37 +02:00
parent de0e6de82b
commit 09033ee6a3
1 changed files with 11 additions and 2 deletions

View File

@ -233,7 +233,12 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
By("Creating rc with 2 pods too big to fit default-pool but fitting extra-pool") By("Creating rc with 2 pods too big to fit default-pool but fitting extra-pool")
ReserveMemory(f, "memory-reservation", 2, 2*memCapacityMb, false) ReserveMemory(f, "memory-reservation", 2, 2*memCapacityMb, false)
defer framework.DeleteRC(f.Client, f.Namespace.Name, "memory-reservation") defer framework.DeleteRC(f.Client, f.Namespace.Name, "memory-reservation")
framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+2, scaleUpTimeout))
// Apparently GKE master is restarted couple minutes after the node pool is added
// reseting all the timers in scale down code. Adding 5 extra minutes to workaround
// this issue.
// TODO: Remove the extra time when GKE restart is fixed.
framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+2, scaleUpTimeout+5*time.Minute))
}) })
It("should correctly scale down after a node is not needed [Feature:ClusterSizeAutoscalingScaleDown]", func() { It("should correctly scale down after a node is not needed [Feature:ClusterSizeAutoscalingScaleDown]", func() {
@ -275,8 +280,12 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
func(size int) bool { return size >= increasedSize+3 }, scaleUpTimeout)) func(size int) bool { return size >= increasedSize+3 }, scaleUpTimeout))
By("Some node should be removed") By("Some node should be removed")
// Apparently GKE master is restarted couple minutes after the node pool is added
// reseting all the timers in scale down code. Adding 10 extra minutes to workaround
// this issue.
// TODO: Remove the extra time when GKE restart is fixed.
framework.ExpectNoError(WaitForClusterSizeFunc(f.Client, framework.ExpectNoError(WaitForClusterSizeFunc(f.Client,
func(size int) bool { return size < increasedSize+3 }, scaleDownTimeout)) func(size int) bool { return size < increasedSize+3 }, scaleDownTimeout+10*time.Minute))
}) })
}) })