parent
edda728d5e
commit
d191622109
|
@ -67,7 +67,8 @@ public class RateLimiterLongRunningUnitTest {
|
||||||
RateLimiter rateLimiter = RateLimiter.create(1);
|
RateLimiter rateLimiter = RateLimiter.create(1);
|
||||||
|
|
||||||
//when
|
//when
|
||||||
boolean result = rateLimiter.tryAcquire(2, 1, TimeUnit.SECONDS);
|
rateLimiter.acquire();
|
||||||
|
boolean result = rateLimiter.tryAcquire(2, 10, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
//then
|
//then
|
||||||
assertThat(result).isFalse();
|
assertThat(result).isFalse();
|
||||||
|
|
Loading…
Reference in New Issue