fix wrong statement in unittest of BoundedFrequencyRunner

This commit is contained in:
cncal 2022-11-15 17:36:26 +08:00
parent 8e48df1353
commit 2670042dde
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ var _ timer = &realTimer{}
// runs are "accumulated" over time, one per minInterval up to burstRuns total. // 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 // This can be used, for example, to mitigate the impact of expensive operations
// being called in response to user-initiated operations. Run requests that // 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 // 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. // force periodic refreshes of state in the absence of anyone calling Run.

View File

@ -273,7 +273,7 @@ func Test_BoundedFrequencyRunnerNoBurst(t *testing.T) {
// Let minInterval pass // Let minInterval pass
timer.advance(999 * time.Millisecond) // rel=1000ms timer.advance(999 * time.Millisecond) // rel=1000ms
waitForRun("fourth run", t, timer, obj) waitForRun("fifth run", t, timer, obj)
// Clean up. // Clean up.
stop <- struct{}{} stop <- struct{}{}