Implement or remove the three skipped caching tests in test_player_service.py #33

Closed
opened 2026-02-20 06:50:45 +00:00 by cal · 1 comment
Owner

tests/unit/test_player_service.py:387, 394, 412 — Three tests marked @pytest.mark.skip(reason="Caching not yet implemented in service methods").

Priority: low | Labels: todo, tech-debt

`tests/unit/test_player_service.py:387, 394, 412` — Three tests marked `@pytest.mark.skip(reason="Caching not yet implemented in service methods")`. **Priority**: low | **Labels**: todo, tech-debt
cal added the
ai-working
label 2026-03-06 16:31:05 +00:00
cal removed the
ai-working
label 2026-03-06 16:33:49 +00:00
Author
Owner

Opened PR #58: #58

Approach: removed the TestPlayerServiceCache class rather than implementing the tests.

Root cause: the tests can't work with the current architecture. get_players is a classmethod with no cache access (so test_cache_set_on_read and test_cache_hit_rate can never pass), and write methods use temp_service = cls() which creates a new instance that doesn't inherit the injected ServiceConfig cache — so any invalidation calls go to a different cache object than the test fixture observes.

Opened PR #58: https://git.manticorum.com/cal/major-domo-database/pulls/58 **Approach: removed** the `TestPlayerServiceCache` class rather than implementing the tests. Root cause: the tests can't work with the current architecture. `get_players` is a classmethod with no cache access (so `test_cache_set_on_read` and `test_cache_hit_rate` can never pass), and write methods use `temp_service = cls()` which creates a new instance that doesn't inherit the injected `ServiceConfig` cache — so any invalidation calls go to a different cache object than the test fixture observes.
cal added the
ai-pr-opened
label 2026-03-06 16:33:56 +00:00
cal closed this issue 2026-03-10 18:26:19 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-database#33
No description provided.