parent
c5066e84e2
commit
3ecd7f04e4
|
@ -11,7 +11,7 @@ func TestRateLimit(t *testing.T) {
|
|||
}
|
||||
|
||||
now()
|
||||
limit := NewRateLimit(time.Second * 2)
|
||||
limit := NewRateLimit(time.Second)
|
||||
|
||||
if ok := limit.Try(); !ok {
|
||||
now()
|
||||
|
@ -25,7 +25,7 @@ func TestRateLimit(t *testing.T) {
|
|||
t.FailNow()
|
||||
}
|
||||
|
||||
time.Sleep(time.Second)
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
|
||||
if ok := limit.Try(); ok {
|
||||
now()
|
||||
|
@ -33,7 +33,7 @@ func TestRateLimit(t *testing.T) {
|
|||
t.FailNow()
|
||||
}
|
||||
|
||||
time.Sleep(time.Second)
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
|
||||
if ok := limit.Try(); !ok {
|
||||
now()
|
||||
|
|
Loading…
Reference in New Issue