From 2670042ddeb1001de46d6c909dd988346d5a3a14 Mon Sep 17 00:00:00 2001 From: cncal Date: Tue, 15 Nov 2022 17:36:26 +0800 Subject: [PATCH] fix wrong statement in unittest of BoundedFrequencyRunner --- pkg/util/async/bounded_frequency_runner.go | 2 +- pkg/util/async/bounded_frequency_runner_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/async/bounded_frequency_runner.go b/pkg/util/async/bounded_frequency_runner.go index 5a719dfaee6..e00b66df1b7 100644 --- a/pkg/util/async/bounded_frequency_runner.go +++ b/pkg/util/async/bounded_frequency_runner.go @@ -135,7 +135,7 @@ var _ timer = &realTimer{} // runs are "accumulated" over time, one per minInterval up to burstRuns total. // This can be used, for example, to mitigate the impact of expensive operations // being called in response to user-initiated operations. Run requests that -// would violate the minInterval are coallesced and run at the next opportunity. +// would violate the minInterval are coalesced and run at the next opportunity. // // The function will be run at least once per maxInterval. For example, this can // force periodic refreshes of state in the absence of anyone calling Run. diff --git a/pkg/util/async/bounded_frequency_runner_test.go b/pkg/util/async/bounded_frequency_runner_test.go index 333adabcf79..0060b43d916 100644 --- a/pkg/util/async/bounded_frequency_runner_test.go +++ b/pkg/util/async/bounded_frequency_runner_test.go @@ -273,7 +273,7 @@ func Test_BoundedFrequencyRunnerNoBurst(t *testing.T) { // Let minInterval pass timer.advance(999 * time.Millisecond) // rel=1000ms - waitForRun("fourth run", t, timer, obj) + waitForRun("fifth run", t, timer, obj) // Clean up. stop <- struct{}{}