Skip to content

Commit

Permalink
AUT-3691: Update MfaResetAuthorizeHandlerIntegrationTest to fix the i…
Browse files Browse the repository at this point in the history
…ssue that caused the 30 second delay to the Txma message being available to read from the SQS queue.
  • Loading branch information
andrew-moores committed Jan 6, 2025
1 parent e855c04 commit e3f45c4
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.nimbusds.jose.jwk.RSAKey;
import com.nimbusds.jwt.SignedJWT;
import com.nimbusds.oauth2.sdk.id.Subject;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand All @@ -36,7 +35,6 @@
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;
import java.time.Duration;
import java.util.Arrays;
import java.util.Base64;
import java.util.Map;
Expand Down Expand Up @@ -153,7 +151,6 @@ void shouldAuthenticateMfaReset() {
Map.of());

assertThat(response, hasStatus(200));
assertEquals(1, txmaAuditQueue.getRawMessages().size());

checkCorrectKeysUsedViaIntegrationWithKms(response.getBody());
checkStateIsStoredViaIntegrationWithRedis(sessionId);
Expand Down Expand Up @@ -198,10 +195,7 @@ private static void checkStateIsStoredViaIntegrationWithRedis(String sessionId)
}

private static void checkTxmaEventPublishedViaIntegrationWithSQS() {
Awaitility.await()
.atMost(Duration.ofSeconds(60))
.pollInterval(Duration.ofSeconds(1))
.until(() -> txmaAuditQueue.getApproximateMessageCount() > 0);
assertEquals(1, txmaAuditQueue.getRawMessages().size());
}

private static void checkExecutionMetricsPublishedViaIntegrationWithCloudWatch() {
Expand Down

0 comments on commit e3f45c4

Please sign in to comment.