Remove stray prints
This commit is contained in:
parent
969d1fb6b6
commit
e7fa269532
@ -129,7 +129,7 @@ func (s *slidingWindow) initialize() {
|
||||
}()
|
||||
|
||||
// Prefill permits to allow tokens to be granted immediately
|
||||
for i := int(0); i < s.capacity; i++ {
|
||||
for i := 0; i < s.capacity; i++ {
|
||||
s.permits <- token{}
|
||||
}
|
||||
}
|
||||
@ -158,7 +158,7 @@ func (s *slidingWindow) slide() {
|
||||
|
||||
s.nextInterval()
|
||||
|
||||
for i := int(0); i < s.prev.count[s.currentInterval]; i++ {
|
||||
for i := 0; i < s.prev.count[s.currentInterval]; i++ {
|
||||
select {
|
||||
case s.permits <- token{}:
|
||||
default:
|
||||
@ -186,7 +186,7 @@ func validate(
|
||||
}
|
||||
|
||||
if windowSize < slideInterval {
|
||||
return clues.New("window too small to fit slide interval")
|
||||
return clues.New("window too small to fit intervals")
|
||||
}
|
||||
|
||||
if windowSize%slideInterval != 0 {
|
||||
|
||||
@ -2,7 +2,6 @@ package limiters
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"testing"
|
||||
@ -126,7 +125,6 @@ func (suite *SlidingWindowUnitTestSuite) TestWaitSliding() {
|
||||
sums := slidingSum(data, sw.numIntervals)
|
||||
|
||||
for _, sum := range sums {
|
||||
fmt.Printf("sum: %d\n", sum)
|
||||
require.True(t, sum <= capacity, "sum: %d, capacity: %d", sum, capacity)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user