diff options
Diffstat (limited to 'internal/ratelimiter/ratelimiter_test.go')
-rw-r--r-- | internal/ratelimiter/ratelimiter_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/ratelimiter/ratelimiter_test.go b/internal/ratelimiter/ratelimiter_test.go index a6f618b..37339ee 100644 --- a/internal/ratelimiter/ratelimiter_test.go +++ b/internal/ratelimiter/ratelimiter_test.go @@ -28,7 +28,7 @@ func TestRatelimiter(t *testing.T) { ) } - for i := 0; i < RatelimiterPacketsBurstable; i++ { + for i := 0; i < packetsBurstable; i++ { Add(RatelimiterResult{ allowed: true, text: "inital burst", @@ -42,7 +42,7 @@ func TestRatelimiter(t *testing.T) { Add(RatelimiterResult{ allowed: true, - wait: Nano(time.Second.Nanoseconds() / RatelimiterPacketsPerSecond), + wait: Nano(time.Second.Nanoseconds() / packetsPerSecond), text: "filling tokens for single packet", }) @@ -53,7 +53,7 @@ func TestRatelimiter(t *testing.T) { Add(RatelimiterResult{ allowed: true, - wait: 2 * Nano(time.Second.Nanoseconds()/RatelimiterPacketsPerSecond), + wait: 2 * (Nano(time.Second.Nanoseconds() / packetsPerSecond)), text: "filling tokens for two packet burst", }) |