Repository navigation
Commit ac900f1
test(sync-health): test_1595 no longer leaves the seam's modules on a dead database (#3254)
With dev's S1 (#4015) merged in, test_3254_skills_alerts.py's
person-ending case fails when test_1595_sync_health_signals.py runs
before it: the ack is refused as `expired`. It passes alone and on dev.
Cause: test_1595's tmp_db evicts `database` and the db.* modules, and
its _restore_sys_modules puts back only the names it lists. On this
branch the poller's alerts go through platform_alerts, so a test here is
the first to import services.ask_service and
services.operator_queue_service, and both bind the transient `database`.
Left loaded, the later file's clock fixture pins the live database's
module globals and misses the copy ask_service still writes through,
so the respond predicate reads the real clock against a row stamped
with the pinned one.
Both names join _STUBBED_MODULE_NAMES, so a test that first imported
them pops them again. The pop now also drops the package attribute
(module_split_guard.unbind), or `from services import ask_service`
would keep handing out the popped copy (#3390). After the file, the set
of modules bound to a stale `db` is the same as on dev.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HWna79vVmnezQdhpaGRKbw1 parent 407c796 commit ac900f1
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| |||
0 commit comments