mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Deflake e2e HPA tests
Tests for scaling down based on external metric are flaky. I think this is because they: - Start with 2 replicas, - Export metric value == 1/2 target, - Expect scale down to 1. Since the expected recommendation is exactly 1 it might flake (and with scale down stabilization any recommendations higher than 1 will persist). Change expected value of the metric so recommended size will be lower than 1. This should make those tests less flaky.
This commit is contained in:
parent
808557e468
commit
b0265bed42
@ -86,7 +86,7 @@ var _ = SIGDescribe("[HPA] Horizontal pod autoscaling (scale resource: Custom Me
|
||||
initialReplicas := 2
|
||||
// metric should cause scale down
|
||||
metricValue := externalMetricValue
|
||||
metricTarget := 2 * metricValue
|
||||
metricTarget := 3 * metricValue
|
||||
metricTargets := map[string]externalMetricTarget{
|
||||
"target": {
|
||||
value: metricTarget,
|
||||
@ -109,7 +109,7 @@ var _ = SIGDescribe("[HPA] Horizontal pod autoscaling (scale resource: Custom Me
|
||||
initialReplicas := 2
|
||||
// metric should cause scale down
|
||||
metricValue := externalMetricValue
|
||||
metricAverageTarget := (3 * metricValue) / 2
|
||||
metricAverageTarget := 3 * metricValue
|
||||
metricTargets := map[string]externalMetricTarget{
|
||||
"target_average": {
|
||||
value: metricAverageTarget,
|
||||
|
Loading…
Reference in New Issue
Block a user