You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wait Until Removed/Created wait forever when timeout is zero (regression in 7.4) #5863
Since RF 7.4, Wait Until Removed and Wait Until Created never time out when the timeout is zero. They wait until the file appears or disappears, or until a test timeout stops them.
*** Settings ***Library OperatingSystem
*** Test Cases ***Zero remove timeout[Timeout]2 s
Create File ${TEMPDIR}/rf-zero-existing.txt
Wait Until Removed ${TEMPDIR}/rf-zero-existing.txt 0
Zero create timeout[Timeout]2 s
Wait Until Created ${TEMPDIR}/rf-zero-missing.txt 0s
On master (7.5.2.dev1) both tests fail with Test timeout 2 seconds exceeded. With RF 7.3.2 they fail at once with '…/rf-zero-existing.txt' was not removed in 0 seconds. and '…/rf-zero-missing.txt' was not created in 0 seconds.
Both keywords convert the timeout with timeout.total_seconds() if timeout else -1. timedelta(0) is falsy, so a zero timeout becomes -1, which means no limit. The keyword documentation names only "a negative value or None" as no limit.
Changing the check to timeout is not None restores the 7.3 behaviour. I have that change with two acceptance tests and can open a pull request if zero should fail fast again rather than mean no limit.
This was broken when adding support for using None for disabling the timeout (#5534). The change was done in commit eb7d773 that also added typing to OperatingSystem (#5373).
This is clearly a regression and I also consider the old semantics better in general. The only problem is that changing the behavior again is a backwards incompatible change as well, especially when there's already been 7.4 and 7.5 releases. I believe we should still change it, but let's not do it in RF 7.5.x series to avoid behavioral changes in bug fix releases. Please create a PR!
Activity
pekkaklarck commentedon Nov 19, 2026
This was broken when adding support for using
Nonefor disabling the timeout (#5534). The change was done in commit eb7d773 that also added typing to OperatingSystem (#5373).This is clearly a regression and I also consider the old semantics better in general. The only problem is that changing the behavior again is a backwards incompatible change as well, especially when there's already been 7.4 and 7.5 releases. I believe we should still change it, but let's not do it in RF 7.5.x series to avoid behavioral changes in bug fix releases. Please create a PR!
pekkaklarck commentedon Nov 20, 2026
Thanks for PR #5864 @Vineet829! I'll merge it after we've started RF 7.6 development.