fix: increase Test time out (#9353)

* Improve session fixture cleanup and engine handling

Refactors the session fixture to use an in-memory SQLite engine with proper disposal and ensures tables are dropped and the engine is disposed of after tests. This enhances resource management and test isolation.

* Update src/backend/tests/conftest.py

* Increase pytest timeout to 150 seconds

Updated the pytest timeout setting from 120 to 150 seconds in pyproject.toml to allow tests more time to complete, potentially addressing issues with longer-running tests.

* Update store_pytest_durations.yml

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
This commit is contained in:
Edwin Jose 2025-08-11 16:25:00 -04:00 committed by GitHub
commit 6e8767d538
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ jobs:
- name: Run unit tests
id: run_tests
continue-on-error: true
run: uv run pytest src/backend/tests/unit --timeout=120 --durations-path src/backend/tests/.test_durations --splitting-algorithm least_duration --store-durations
run: uv run pytest src/backend/tests/unit --timeout=150 --durations-path src/backend/tests/.test_durations --splitting-algorithm least_duration --store-durations
- name: Close existing PRs

View file

@ -242,7 +242,7 @@ ignore-regex = '.*(Stati Uniti|Tense=Pres).*'
[tool.pytest.ini_options]
timeout = 120
timeout = 150
timeout_method = "signal"
minversion = "6.0"
testpaths = ["src/backend/tests"]