diff options
Diffstat (limited to 'Godeps/_workspace/src/gopkg.in/redis.v2/rate_limit_test.go')
-rw-r--r-- | Godeps/_workspace/src/gopkg.in/redis.v2/rate_limit_test.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Godeps/_workspace/src/gopkg.in/redis.v2/rate_limit_test.go b/Godeps/_workspace/src/gopkg.in/redis.v2/rate_limit_test.go deleted file mode 100644 index 2f0d41a2e..000000000 --- a/Godeps/_workspace/src/gopkg.in/redis.v2/rate_limit_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package redis - -import ( - "sync" - "testing" - "time" -) - -func TestRateLimiter(t *testing.T) { - var n = 100000 - if testing.Short() { - n = 1000 - } - rl := newRateLimiter(time.Minute, n) - - wg := &sync.WaitGroup{} - for i := 0; i < n; i++ { - wg.Add(1) - go func() { - if !rl.Check() { - panic("check failed") - } - wg.Done() - }() - } - wg.Wait() - - if rl.Check() && rl.Check() { - t.Fatal("check passed") - } -} |