Unexpected behavior from waiter if timeout provided #5838
Labels
documentation
This is a problem with documentation.
p2
This is a standard priority issue
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Describe the bug
Based on the documentation it is possible to override the default configuration of the waiter. One of the example demonstrates the option to provide custom timeout -
o.waitTimeout(Duration.ofMinutes(1))
. So the expectation in this case that overall amount of time that waiter is going to be waiting should be based on that provided timeout. However, waiter could be stopped earlier if it reaches maxAttempts, that defaults to 100.For example, if we set waitTimeout as Duration.ofMinutes(30) - it won't work like that. Waiter will be stopped after 10 minutes, because it has 100 attempts and 6s between them provided by default.
Regression Issue
Expected Behavior
Either skip
maxAttempts
(do not set it as default = 100) or recalculate it in runtime based on provided timeout if overridden configuration providedCurrent Behavior
Waiter with overridden configuration doesn't work as expected
Reproduction Steps
Possible Solution
If the described behavior considered as valid and expected, please at least update the documentation to mention this as it is really confusing at the moment. However, I still consider not convenient to force users to recalculate amount of attempts manually if they just want to focus on timeout.
Additional Information/Context
No response
AWS Java SDK version used
2.29.43
JDK version used
11
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: