Merge pull request #116040 from pbeschetnov/master

[HPA e2e] Reduce possible number of scale steps to minimize stabilization test flakiness
This commit is contained in:
Kubernetes Prow Robot 2023-03-07 04:20:16 -08:00 committed by GitHub
commit 4eb29bcb21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,7 +417,7 @@ var _ = SIGDescribe("[Feature:HPA] [Serial] [Slow] Horizontal pod autoscaling (n
ginkgo.DeferCleanup(e2eautoscaling.DeleteHPAWithBehavior, rc, hpa.Name)
ginkgo.By("triggering scale up by increasing consumption")
rc.ConsumeCPU(usageForReplicas(4))
rc.ConsumeCPU(usageForReplicas(3))
waitDeadline := upScaleStabilization
ginkgo.By("verifying number of replicas stay in desired range within stabilisation window")
@ -426,7 +426,7 @@ var _ = SIGDescribe("[Feature:HPA] [Serial] [Slow] Horizontal pod autoscaling (n
ginkgo.By("waiting for replicas to scale up after stabilisation window passed")
waitStart := time.Now()
waitDeadline = maxHPAReactionTime + maxResourceConsumerDelay + waitBuffer
rc.WaitForReplicas(ctx, 4, waitDeadline)
rc.WaitForReplicas(ctx, 3, waitDeadline)
timeWaited := time.Now().Sub(waitStart)
framework.Logf("time waited for scale up: %s", timeWaited)
gomega.Expect(timeWaited).To(gomega.BeNumerically("<", waitDeadline), "waited %s, wanted less than %s", timeWaited, waitDeadline)
@ -436,7 +436,7 @@ var _ = SIGDescribe("[Feature:HPA] [Serial] [Slow] Horizontal pod autoscaling (n
waitDeadline = downScaleStabilization
ginkgo.By("verifying number of replicas stay in desired range within stabilisation window")
rc.EnsureDesiredReplicasInRange(ctx, 4, 4, waitDeadline, hpa.Name)
rc.EnsureDesiredReplicasInRange(ctx, 3, 3, waitDeadline, hpa.Name)
ginkgo.By("waiting for replicas to scale down after stabilisation window passed")
waitStart = time.Now()