Skip to content

Allow listeners to modify test timeouts - #5784

Open
aprylewu wants to merge 1 commit into
robotframework:masterfrom
aprylewu:fix/listener-test-timeouts
Open

aprylewu wants to merge 1 commit into
robotframework:masterfrom
aprylewu:fix/listener-test-timeouts

Conversation

@aprylewu

Copy link
Copy Markdown

Changing data.timeout in a start_test listener currently leaves the original timeout active, so listeners cannot add, extend, or disable test timeouts. Refresh the active timeout when a listener changes the setting, remove the original timer, and measure the updated timeout from the original test start.

The change keeps the existing TestTimeout result type and resolves variables after listeners run. Regression tests cover adding, shortening, extending, removing, disabling, invalid values, variables, setup execution, and unchanged settings. Keyword timeout changes already work; the new tests cover that behavior too. A deterministic unit test verifies that listener execution time counts toward the updated timeout.

Validation on macOS with Python 3.13.5:

  • New acceptance suite: 9 passed with output schema validation; 6 fail on the unmodified base.
  • Full unit suite: 2439 passed.
  • Full default acceptance suite: 7140 passed.
  • invoke format on the changed Python files and git diff --check passed.

Fixes #5350.

Prepared with OpenAI Codex assistance, including implementation, tests, and an independent Codex review.

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.

Listeners cannot set timeouts

1 participant