-
Notifications
You must be signed in to change notification settings - Fork 916
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
Add functional tests and integration tests for Waiters #2062
Conversation
...es/dynamodb/src/it/java/software/amazon/awssdk/services/dynamodb/WaitersIntegrationTest.java
Show resolved
Hide resolved
...es/dynamodb/src/it/java/software/amazon/awssdk/services/dynamodb/WaitersIntegrationTest.java
Show resolved
Hide resolved
...es/dynamodb/src/it/java/software/amazon/awssdk/services/dynamodb/WaitersIntegrationTest.java
Outdated
Show resolved
Hide resolved
...s-test/src/test/java/software/amazon/awssdk/services/waiters/WaitersAsyncFunctionalTest.java
Show resolved
Hide resolved
import software.amazon.awssdk.services.restjsonwithwaiters.model.AllTypesResponse; | ||
import software.amazon.awssdk.services.restjsonwithwaiters.waiters.RestJsonWithWaitersWaiter; | ||
|
||
public class WaitersSyncFunctionalTest { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😅
There was a problem hiding this comment.
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.
eeb3007
to
9a49f08
Compare
...es/dynamodb/src/it/java/software/amazon/awssdk/services/dynamodb/WaitersIntegrationTest.java
Outdated
Show resolved
Hide resolved
...es/dynamodb/src/it/java/software/amazon/awssdk/services/dynamodb/WaitersIntegrationTest.java
Outdated
Show resolved
Hide resolved
9a49f08
to
10b5c3d
Compare
Kudos, SonarCloud Quality Gate passed!
|
…3ae087185 Pull request: release <- staging/f0f7ce0a-c9e2-46ef-9d27-2403ae087185
Add integration tests for DynamoDB Waiters;
Add functional tests for RestJsonWithWaiters Waiters;
License