aws / aws-sdk-net-extensions-cognito

An extension library to assist in the Amazon Cognito User Pools authentication process
Apache License 2.0
102 stars 49 forks source link

Increased timeout for intermittent test failure and fixed cleanup process #80

Closed ashishdhingra closed 2 years ago

ashishdhingra commented 2 years ago

Issue #, if available: Recent changes for Cognito pipeline reported test failures.

Description of changes: Fixed the following tests for failures:

NOTE: Switching await DoThingAsync() to DoThingAsync().Wait() is usually a very bad idea. However, in current scenario, since the test process exits, awaiting is aborted and resources are not cleaned up. Refer the other test case Amazon.Extensions.CognitoAuthentication.IntegrationTests.MfaAuthenticationTests.TestMfaAuthenticationFlow, it Wait(s). Also, the resources have to be cleaned up in specific order and awaiting normally might not guarantee the order in which the API calls would be executed.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.