Skip to content

[timeout] Add test timeout - #49

Open
kapilsh wants to merge 1 commit into
mainfrom
oss/pytest-timeout
Open

kapilsh wants to merge 1 commit into
mainfrom
oss/pytest-timeout

Conversation

@kapilsh

@kapilsh kapilsh commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add pytest-timeout to the dev dependency group.
  • Set timeout = 120 in [tool.pytest.ini_options]. A test that runs for more than 120 seconds fails, and pytest shows its stack.
  • Before this change, a test that hung blocked the GPU job until the 60-minute job timeout. The log did not show which test hung.
  • The limit applies to the CI jobs and to local runs.

Test plan

  • pytest shows "timeout: 120.0s" without the --timeout option. test_ipc_fd.py: 9 passed.
  • uv 0.13.9: uv lock --check passes.
  • lintrunner: no issues.

CI ran pytest with no time limit for each test. A test that hung
blocked the GPU job until the 60-minute job timeout, and the log did
not show which test hung.

The dev dependency group now includes pytest-timeout, and
[tool.pytest.ini_options] sets timeout = 120. A test that runs for more
than 120 seconds fails, and pytest shows its stack. This applies to the
CI jobs and to local runs.

Test plan:
- pytest shows "timeout: 120.0s" without the --timeout option.
  test_ipc_fd.py: 9 passed.
- uv 0.13.9: uv lock --check passes.
- lintrunner: no issues.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 26, 2026
@kapilsh kapilsh changed the title Stop each test after 120 seconds [timeout] Add test timeout Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant