Use non-legacy rate limit error in BackupAuthManager

This commit is contained in:
Ravi Khadiwala
2024-07-11 12:42:30 -05:00
committed by ravi-signal
parent 2408590430
commit 0ef3e00ba7
2 changed files with 7 additions and 4 deletions

View File

@@ -406,9 +406,10 @@ public class BackupAuthManagerTest {
when(accountsManager.updateAsync(any(), any())).thenReturn(CompletableFuture.completedFuture(account));
// Should be rate limited
CompletableFutureTestUtil.assertFailsWithCause(
final RateLimitExceededException ex = CompletableFutureTestUtil.assertFailsWithCause(
RateLimitExceededException.class,
authManager.commitBackupId(account, credentialRequest));
assertThat(ex.isLegacy()).isFalse();
// If we don't change the request, shouldn't be rate limited
when(account.getBackupCredentialRequest()).thenReturn(credentialRequest.serialize());