add a blocking accept method to RateLimiter

This commit is contained in:
Ben Parees
2015-04-01 17:57:30 -04:00
parent 0cf3590c36
commit 70be667cf8
3 changed files with 22 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ type fakeRL bool
func (fakeRL) Stop() {}
func (f fakeRL) CanAccept() bool { return bool(f) }
func (f fakeRL) Accept() {}
func TestRateLimit(t *testing.T) {
for _, allow := range []bool{true, false} {