Removed exported methods from ratelimiter package
This commit is contained in:
parent
5f0a91a127
commit
8bdadaae59
2 changed files with 38 additions and 42 deletions
|
|
@ -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",
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue