Skip to content

Unexpected behavior from waiter if timeout provided #5838

Open
@oleg-rd

Description

@oleg-rd

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

  • Select this option if this issue appears to be a regression.

Expected Behavior

Either skip maxAttempts (do not set it as default = 100) or recalculate it in runtime based on provided timeout if overridden configuration provided

Current Behavior

Waiter with overridden configuration doesn't work as expected

Reproduction Steps

        WaiterOverrideConfiguration waiterOverrideConfiguration = WaiterOverrideConfiguration.builder()
                .waitTimeout(Duration.ofSeconds(30))
                .build();

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

Metadata

Metadata

Assignees

Labels

documentationThis is a problem with documentation.p2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions