Skip to content

Fix Wait Until Removed/Created waiting forever with zero timeout - #5864

Open
Vineet829 wants to merge 2 commits into
robotframework:masterfrom
Vineet829:wait-until-zero-timeout
Open

Vineet829 wants to merge 2 commits into
robotframework:masterfrom
Vineet829:wait-until-zero-timeout

Conversation

@Vineet829

Copy link
Copy Markdown

Fixes #5863

Wait Until Removed and Wait Until Created convert the timeout with timeout.total_seconds() if timeout else -1. timedelta(0) is falsy, so a zero timeout became -1 (no limit) and the keywords waited forever. The check is now timeout is not None, so zero fails at once again, as in RF 7.3, and only None or a negative value disables the limit.

Only a zero timeout changes. This is against master, for 7.6 as discussed in the issue. Added Zero remove timeout and Zero create timeout acceptance tests; without the change both run into their test timeout.

@pekkaklarck pekkaklarck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! As I commented the issue, I don't want the behavior to change in a bug fix release, so I'll merge this as soon as we start RF 7.6 development. That may be already next week, but we still need to decide do we want to create RF 7.5.2 or not.

@pekkaklarck

Copy link
Copy Markdown
Member

One possible thing to add is a note that using 0 disables the timeout in 7.4 and 7.5. There's a note about the newish None behavior and perhaps it could be changed to something like this:

Disabling timeout using None is new in Robot Framework 7.4. In Robot Framework 7.4 and 7.5 using 0 incorrectly disabled the timeout as well.

What do you think about the this? If you think it's a good idea, please add something like above to the PR.

@Vineet829

Copy link
Copy Markdown
Author

Good idea, thanks! I added that note to the docs of both Wait Until Removed and Wait Until Created.

This branch has not been deployed

No deployments
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.

Wait Until Removed/Created wait forever when timeout is zero (regression in 7.4)

2 participants