mirror of
https://github.com/openfaas/faas.git
synced 2025-06-23 07:13:23 +00:00
When firing, newReplicas should be greater than currentReplicas
Signed-off-by: Gede Wahyu <tokekbesi@gmail.com>
This commit is contained in:
@ -105,7 +105,7 @@ func TestScaledUpFrom1(t *testing.T) {
|
||||
maxReplicas := uint64(5)
|
||||
scalingFactor := uint64(30)
|
||||
newReplicas := CalculateReplicas("firing", currentReplicas, maxReplicas, scaling.DefaultMinReplicas, scalingFactor)
|
||||
if newReplicas == currentReplicas {
|
||||
if newReplicas <= currentReplicas {
|
||||
t.Log("Expected newReplicas > currentReplica")
|
||||
t.Fail()
|
||||
}
|
||||
@ -116,7 +116,7 @@ func TestScaledUpWithSmallParam(t *testing.T) {
|
||||
maxReplicas := uint64(4)
|
||||
scalingFactor := uint64(1)
|
||||
newReplicas := CalculateReplicas("firing", currentReplicas, maxReplicas, scaling.DefaultMinReplicas, scalingFactor)
|
||||
if newReplicas == currentReplicas {
|
||||
if newReplicas <= currentReplicas {
|
||||
t.Log("Expected newReplicas > currentReplica")
|
||||
t.Fail()
|
||||
}
|
||||
|
Reference in New Issue
Block a user