Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
suite:
runs-on: ubuntu-latest
# A hung test must turn red in minutes, not burn GitHub's 6-hour default.
timeout-minutes: 30
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -85,4 +85,4 @@ jobs:
# xdist reports a collection error as a worker crash; collect alone first so it reads as one.
- run: .venv/bin/pytest --collect-only -q
# A test stuck past 120 s dumps every thread, so the red names where it hung.
- run: .venv/bin/pytest -n auto --basetemp .artifacts/pilots -o faulthandler_timeout=120 -rfE -vv --tb=short
- run: .venv/bin/pytest -n auto --basetemp .artifacts/pilots -o faulthandler_timeout=120 -rfE -vv --tb=short --durations=40
9 changes: 9 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ def pytest_collection_modifyitems(config, items):
item.add_report_section("call", "Recorded defect", note)


def pytest_unconfigure(config):
"""Helpers inherit this process's pipes; the runner reads until they close, so a test
whose close failed would otherwise run out its whole timeout after it already reported."""
if (attempt := os.environ.get(ATTEMPT)) is not None:
from support.processes import stop_test_children

asyncio.run(stop_test_children(attempt))


def pytest_runtest_logreport(report):
if (path := os.environ.get(RESULT)) is None:
return
Expand Down
Loading