diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/AccountControllerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/AccountControllerTest.java index a670f20dc..5bf6f452c 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/AccountControllerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/AccountControllerTest.java @@ -357,7 +357,7 @@ class AccountControllerTest { rateLimiters, RateLimiters.For.USERNAME_LINK_OPERATION, AuthHelper.VALID_UUID); } else { MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.USERNAME_LINK_OPERATION, AuthHelper.VALID_UUID, Duration.ofMinutes(10), false); + rateLimiters, RateLimiters.For.USERNAME_LINK_OPERATION, AuthHelper.VALID_UUID, Duration.ofMinutes(10)); } // checking if username is to be set for this test @@ -407,7 +407,7 @@ class AccountControllerTest { rateLimiters, RateLimiters.For.USERNAME_LINK_OPERATION, AuthHelper.VALID_UUID); } else { MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.USERNAME_LINK_OPERATION, AuthHelper.VALID_UUID, Duration.ofMinutes(10), false); + rateLimiters, RateLimiters.For.USERNAME_LINK_OPERATION, AuthHelper.VALID_UUID, Duration.ofMinutes(10)); } final Invocation.Builder builder = resources.getJerseyTest() @@ -451,7 +451,7 @@ class AccountControllerTest { rateLimiters, RateLimiters.For.USERNAME_LINK_LOOKUP_PER_IP, "127.0.0.1"); } else { MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.USERNAME_LINK_LOOKUP_PER_IP, "127.0.0.1", Duration.ofMinutes(10), false); + rateLimiters, RateLimiters.For.USERNAME_LINK_LOOKUP_PER_IP, "127.0.0.1", Duration.ofMinutes(10)); } when(accountsManager.getByUsernameLinkHandle(any())).thenReturn(CompletableFuture.completedFuture(Optional.empty())); @@ -887,7 +887,7 @@ class AccountControllerTest { when(accountsManager.getByAccountIdentifier(accountIdentifier)).thenReturn(Optional.of(account)); MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.CHECK_ACCOUNT_EXISTENCE, "127.0.0.1", expectedRetryAfter, true); + rateLimiters, RateLimiters.For.CHECK_ACCOUNT_EXISTENCE, "127.0.0.1", expectedRetryAfter); try (final Response response = resources.getJerseyTest() .target(String.format("/v1/accounts/account/%s", accountIdentifier)) @@ -939,7 +939,7 @@ class AccountControllerTest { void testLookupUsernameRateLimited() { final Duration expectedRetryAfter = Duration.ofSeconds(13); MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.USERNAME_LOOKUP, "127.0.0.1", expectedRetryAfter, true); + rateLimiters, RateLimiters.For.USERNAME_LOOKUP, "127.0.0.1", expectedRetryAfter); final Response response = resources.getJerseyTest() .target(String.format("v1/accounts/username_hash/%s", BASE_64_URL_USERNAME_HASH_1)) .request() diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyControllerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyControllerTest.java index 474d9cbf1..fa7500b23 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyControllerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyControllerTest.java @@ -289,7 +289,7 @@ public class KeyTransparencyControllerTest { @Test void searchRateLimited() { MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.KEY_TRANSPARENCY_SEARCH_PER_IP, "127.0.0.1", Duration.ofMinutes(10), true); + rateLimiters, RateLimiters.For.KEY_TRANSPARENCY_SEARCH_PER_IP, "127.0.0.1", Duration.ofMinutes(10)); final Invocation.Builder request = resources.getJerseyTest() .target("/v1/key-transparency/search") .request(); @@ -506,7 +506,7 @@ public class KeyTransparencyControllerTest { @Test void monitorRateLimited() { MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.KEY_TRANSPARENCY_MONITOR_PER_IP, "127.0.0.1", Duration.ofMinutes(10), true); + rateLimiters, RateLimiters.For.KEY_TRANSPARENCY_MONITOR_PER_IP, "127.0.0.1", Duration.ofMinutes(10)); final Invocation.Builder request = resources.getJerseyTest() .target("/v1/key-transparency/monitor") .request(); @@ -602,8 +602,8 @@ public class KeyTransparencyControllerTest { @Test void distinguishedRateLimited() { MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.KEY_TRANSPARENCY_DISTINGUISHED_PER_IP, "127.0.0.1", Duration.ofMinutes(10), - true); + rateLimiters, RateLimiters.For.KEY_TRANSPARENCY_DISTINGUISHED_PER_IP, "127.0.0.1", Duration.ofMinutes(10) + ); final Invocation.Builder request = resources.getJerseyTest() .target("/v1/key-transparency/distinguished") .request(); diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/CallingGrpcServiceTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/CallingGrpcServiceTest.java index b8b5d46c5..098fab59d 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/CallingGrpcServiceTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/CallingGrpcServiceTest.java @@ -67,7 +67,7 @@ class CallingGrpcServiceTest extends SimpleBaseGrpcTest authenticatedServiceStub().getTurnCredentials(GetTurnCredentialsRequest.newBuilder().build())); verify(turnTokenGenerator, never()).generate(any()); verifyNoInteractions(turnTokenGenerator); diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ExternalServiceCredentialsGrpcServiceTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ExternalServiceCredentialsGrpcServiceTest.java index 064793847..e4fa24732 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ExternalServiceCredentialsGrpcServiceTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ExternalServiceCredentialsGrpcServiceTest.java @@ -110,7 +110,7 @@ public class ExternalServiceCredentialsGrpcServiceTest @Test public void testRateLimitExceeded() throws Exception { final Duration retryAfter = MockUtils.updateRateLimiterResponseToFail( - rateLimiters, RateLimiters.For.EXTERNAL_SERVICE_CREDENTIALS, AUTHENTICATED_ACI, Duration.ofSeconds(100), false); + rateLimiters, RateLimiters.For.EXTERNAL_SERVICE_CREDENTIALS, AUTHENTICATED_ACI, Duration.ofSeconds(100)); Mockito.reset(ART_CREDENTIALS_GENERATOR); assertRateLimitExceeded( retryAfter, diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java index 59db02398..e5b496463 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java @@ -564,7 +564,7 @@ public class ProfileGrpcServiceTest extends SimpleBaseGrpcTest