From d191622109498b2da9bd00970bedb36b842eb51a Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Sat, 8 Jul 2017 13:16:40 +0200 Subject: [PATCH] Ratelimiter fix (#2231) * RateLimiter fix * RateLimiter fix --- .../org/baeldung/guava/RateLimiterLongRunningUnitTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guava/src/test/java/org/baeldung/guava/RateLimiterLongRunningUnitTest.java b/guava/src/test/java/org/baeldung/guava/RateLimiterLongRunningUnitTest.java index 22041e78e5..914de01a6d 100644 --- a/guava/src/test/java/org/baeldung/guava/RateLimiterLongRunningUnitTest.java +++ b/guava/src/test/java/org/baeldung/guava/RateLimiterLongRunningUnitTest.java @@ -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();