Ratelimiter fix (#2231)

* RateLimiter fix

* RateLimiter fix
This commit is contained in:
Grzegorz Piwowarek 2017-07-08 13:16:40 +02:00 committed by GitHub
parent edda728d5e
commit d191622109
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ public class RateLimiterLongRunningUnitTest {
RateLimiter rateLimiter = RateLimiter.create(1);
//when
boolean result = rateLimiter.tryAcquire(2, 1, TimeUnit.SECONDS);
rateLimiter.acquire();
boolean result = rateLimiter.tryAcquire(2, 10, TimeUnit.MILLISECONDS);
//then
assertThat(result).isFalse();