Skip to content

Add functional tests and integration tests for Waiters #2062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

Quanzzzz
Copy link
Contributor

Add integration tests for DynamoDB Waiters;
Add functional tests for RestJsonWithWaiters Waiters;

License

  • I confirm that this pull request can be released under the Apache 2 license

@Quanzzzz Quanzzzz requested a review from dagnir September 23, 2020 20:40
import software.amazon.awssdk.services.restjsonwithwaiters.model.AllTypesResponse;
import software.amazon.awssdk.services.restjsonwithwaiters.waiters.RestJsonWithWaitersWaiter;

public class WaitersSyncFunctionalTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we need to test other scenarios as well such as

  • What happens when we reach max number of attempts
  • What happens when we get an unexpected exception
  • What happens to the client and scheduled executor when the the waiter is closed?
  • etc.

cc: @zoewangg for more suggestions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max number of attempts case is added in sync Waiters. Unexpected exception case has been covered by the tests for generic Waiters. For the third case, if the client and scheduled executor are configured while creating the Waiters then they won't be closed while the Waiters are closed, and tests related to this case are also added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dagnir Good call! I added the test cases with unexpected exception and caught a bug in waiterRuntime 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅Guess that's my fault. I misunderstood the unmatched exception case in the BaseWaiterTest, thanks for making sure about it again.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

@Quanzzzz Quanzzzz merged commit ed1b2ca into aws:waiters-development Sep 24, 2020
aws-sdk-java-automation added a commit that referenced this pull request Jun 20, 2022
…3ae087185

Pull request: release <- staging/f0f7ce0a-c9e2-46ef-9d27-2403ae087185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants