undef-engine
2026-03-28
Fix Redis test isolation under pytest-xdist; add auth lockout tests
4 files · 232+ · 159-
Redis test isolation under pytest-xdist
2 files changed
test_card_repository_cross_backend.pyAdded test_game_id fixture using PYTEST_XDIST_WORKER for worker-unique game IDs; redis_repo now uses REDIS_DB env var to avoid cross-worker DB collisionstest_redis_card_repository.pySame worker-unique game ID and REDIS_DB isolation pattern
- Under pytest-xdist -n auto, parallel workers share the Redis instance. Tests using hard-coded ’test-cross’ game IDs would collide and interfere. test_game_id fixture now generates IDs from PYTEST_XDIST_WORKER, and redis_repo reads REDIS_DB from env (set per worker by integration conftest) to partition by DB index.
remediate
internal
2 files
test_card_repository_cross_backend.pytest_redis_card_repository.py
Auth lockout tests and list endpoint updates
2 files changed
test_lockout.py16-line auth lockout unit teststest_list_endpoints.py12-line update for list endpoint integration tests