at most every may result in less than expected times if overloaded
Signed-off-by: Alan Zhu <zg.zhu@daocloud.io> Kubernetes-commit: 67234271ef50da475b4627b484b3b45ee54e8f8d
This commit is contained in:
parent
d7ce3ecdcf
commit
3292215ff4
|
@ -45,7 +45,7 @@ func TestAtMostEvery(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
if expected := int(duration/delay) + 1; count != expected {
|
||||
t.Fatalf("Function called %d times, should have been called exactly %d times", count, expected)
|
||||
if expected := int(duration/delay) + 1; count > expected {
|
||||
t.Fatalf("Function called %d times, should have been called less than or equal to %d times", count, expected)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue