diff --git a/.github/workflows/_system_test.yml b/.github/workflows/_system_test.yml index dbd1f74bb..eb82be2a7 100644 --- a/.github/workflows/_system_test.yml +++ b/.github/workflows/_system_test.yml @@ -11,6 +11,7 @@ env: jobs: run: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index fc381e0c5..12f87e406 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -18,6 +18,7 @@ env: jobs: run: runs-on: ${{ inputs.runs-on }} + timeout-minutes: 15 steps: - name: Checkout diff --git a/pyproject.toml b/pyproject.toml index ad1465a94..725cc747c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,6 @@ dev = [ "pytest-cov", "pytest-asyncio", "pytest-httpx>=0.35.0", - "pytest-timeout", "responses", "ruff", "semver", @@ -106,11 +105,6 @@ filterwarnings = ["error", "ignore::DeprecationWarning"] # Doctest python code in docs, python code in src docstrings, test functions in tests testpaths = "docs src tests" asyncio_mode = "auto" -# Timeout settings for pytest-timeout -timeout = 10 -# Timeout using thread method to make pytest-timeout work with pytest-xdist -timeout_method = "thread" -timeout_func_only = true [tool.coverage.run] patch = ["subprocess"] data_file = "/tmp/blueapi.coverage" @@ -164,9 +158,6 @@ commands = [ "pytest", "-n", "logical", - # Disable worker restarts so pytest-xdist does not rerun a test in another worker after pytest-timeout triggers - "--max-worker-restart", - "0", { replace = "posargs", default = [ "tests/unit_tests", ], extend = true }, @@ -189,7 +180,6 @@ commands = [ "term", "--cov-report", "xml:cov.xml", - "--timeout=60", { replace = "posargs", default = [ ], extend = true }, ], diff --git a/tests/system_tests/test_blueapi_system.py b/tests/system_tests/test_blueapi_system.py index 138ee85c9..04439bfed 100644 --- a/tests/system_tests/test_blueapi_system.py +++ b/tests/system_tests/test_blueapi_system.py @@ -897,7 +897,6 @@ def test_run_blocking_requires_auth( # Kept last: installs packages into the environment, so it must not run # before (and potentially disturb) the tests above. -@pytest.mark.timeout(600) @pytest.mark.parametrize( "repos,expected_location_name,expected_version", [ diff --git a/tests/unit_tests/test_example_config.py b/tests/unit_tests/test_example_config.py index 5c6c6c742..f323cbcb3 100644 --- a/tests/unit_tests/test_example_config.py +++ b/tests/unit_tests/test_example_config.py @@ -21,7 +21,6 @@ def test_example_config_is_valid(file_name: str): loader.load() -@pytest.mark.timeout(30) @pytest.mark.parametrize("file_name", os.listdir(example_helm)) def test_example_helm_is_valid(file_name: str): path = example_helm / file_name diff --git a/uv.lock b/uv.lock index 9d02bbd9f..8e9213304 100644 --- a/uv.lock +++ b/uv.lock @@ -529,7 +529,6 @@ dev = [ { name = "pytest-asyncio" }, { name = "pytest-cov" }, { name = "pytest-httpx" }, - { name = "pytest-timeout" }, { name = "pytest-xdist", extra = ["psutil"] }, { name = "responses" }, { name = "respx" }, @@ -594,7 +593,6 @@ dev = [ { name = "pytest-asyncio" }, { name = "pytest-cov" }, { name = "pytest-httpx", specifier = ">=0.35.0" }, - { name = "pytest-timeout" }, { name = "pytest-xdist", extras = ["psutil"] }, { name = "responses" }, { name = "respx" }, @@ -5241,18 +5239,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1e/55/1fa65f8e4fceb19dd6daa867c162ad845d547f6058cd92b4b02384a44777/pytest_httpx-0.36.2-py3-none-any.whl", hash = "sha256:d42ebd5679442dc7bfb0c48e0767b6562e9bc4534d805127b0084171886a5e22", size = 20315, upload-time = "2026-04-09T13:57:18.587Z" }, ] -[[package]] -name = "pytest-timeout" -version = "2.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pytest" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ac/82/4c9ecabab13363e72d880f2fb504c5f750433b2b6f16e99f4ec21ada284c/pytest_timeout-2.4.0.tar.gz", hash = "sha256:7e68e90b01f9eff71332b25001f85c75495fc4e3a836701876183c4bcfd0540a", size = 17973, upload-time = "2025-05-05T19:44:34.99Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fa/b6/3127540ecdf1464a00e5a01ee60a1b09175f6913f0644ac748494d9c4b21/pytest_timeout-2.4.0-py3-none-any.whl", hash = "sha256:c42667e5cdadb151aeb5b26d114aff6bdf5a907f176a007a30b940d3d865b5c2", size = 14382, upload-time = "2025-05-05T19:44:33.502Z" }, -] - [[package]] name = "pytest-xdist" version = "3.8.0"