Skip to content

Commit 375c298

Browse files
authored
fix(auth): Fix race condition in new unit tests added to AWSCognitoAuthPluginTest (#2954)
1 parent 30d2e1d commit 375c298

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aws-auth-cognito/src/test/java/com/amplifyframework/auth/cognito/AWSCognitoAuthPluginTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ class AWSCognitoAuthPluginTest {
776776
fun listWebAuthnCredentials() {
777777
val useCase = authPlugin.useCaseFactory.listWebAuthnCredentials()
778778
authPlugin.listWebAuthnCredentials({}, {})
779-
coVerify {
779+
coVerify(timeout = CHANNEL_TIMEOUT) {
780780
useCase.execute(AuthListWebAuthnCredentialsOptions.defaults())
781781
}
782782
}
@@ -786,7 +786,7 @@ class AWSCognitoAuthPluginTest {
786786
val useCase = authPlugin.useCaseFactory.listWebAuthnCredentials()
787787
val options = AWSCognitoAuthListWebAuthnCredentialsOptions.builder().build()
788788
authPlugin.listWebAuthnCredentials(options, {}, {})
789-
coVerify {
789+
coVerify(timeout = CHANNEL_TIMEOUT) {
790790
useCase.execute(options)
791791
}
792792
}
@@ -796,7 +796,7 @@ class AWSCognitoAuthPluginTest {
796796
val useCase = authPlugin.useCaseFactory.deleteWebAuthnCredential()
797797
val credentialId = "someId"
798798
authPlugin.deleteWebAuthnCredential(credentialId, {}, {})
799-
coVerify {
799+
coVerify(timeout = CHANNEL_TIMEOUT) {
800800
useCase.execute(credentialId, AuthDeleteWebAuthnCredentialOptions.defaults())
801801
}
802802
}
@@ -807,7 +807,7 @@ class AWSCognitoAuthPluginTest {
807807
val options: AuthDeleteWebAuthnCredentialOptions = mockk()
808808
val credentialId = "someId"
809809
authPlugin.deleteWebAuthnCredential(credentialId, options, {}, {})
810-
coVerify {
810+
coVerify(timeout = CHANNEL_TIMEOUT) {
811811
useCase.execute(credentialId, options)
812812
}
813813
}

0 commit comments

Comments
 (0)