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:
Alan Zhu 2021-02-25 16:27:42 +08:00 committed by Kubernetes Publisher
parent d7ce3ecdcf
commit 3292215ff4
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}