Use non-legacy rate limit error in BackupAuthManager

This commit is contained in:
Ravi Khadiwala authored and ravi-signal committed 2024-07-11 16:39:11 -05:00
1 parent 2408590430
commit 0ef3e00ba7
2 files changed
+7 -4

No files matched your search

@@ -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());