File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ func TestSlidingWindowAutoscaler_Scale_BasicScaling(t *testing.T) {
185185 panicValue : 2500 ,
186186 readyPodCount : 2 ,
187187 },
188- expectedPodCount : 3 , // ceil(2500/1000) = 3
188+ expectedPodCount : 5 , // ceil(2 * 2500/1000) = 5
189189 },
190190 {
191191 name : "total target value - scale down" ,
@@ -200,7 +200,7 @@ func TestSlidingWindowAutoscaler_Scale_BasicScaling(t *testing.T) {
200200 panicValue : 500 ,
201201 readyPodCount : 5 ,
202202 },
203- expectedPodCount : 2 , // limited by max scale down rate (5/2.0)
203+ expectedPodCount : 3 , // ceil(5 * 500/1000) = 3
204204 },
205205 {
206206 name : "total target value with activation scale" ,
@@ -325,8 +325,9 @@ func TestSlidingWindowAutoscaler_Scale_PanicMode_TotalTargetValue(t *testing.T)
325325 if ! recommendation .InPanicMode {
326326 t .Error ("expected to enter panic mode" )
327327 }
328- if recommendation .DesiredPodCount != 5 {
329- t .Errorf ("expected pod count 5, got %d" , recommendation .DesiredPodCount )
328+ // 2 pods * 5000 / 1000 = 10 pods
329+ if recommendation .DesiredPodCount != 10 {
330+ t .Errorf ("expected pod count 10, got %d" , recommendation .DesiredPodCount )
330331 }
331332}
332333
You can’t perform that action at this time.
0 commit comments