Commit 0db90f0
test(webapp): mock eager-Redis import-time singletons in global test setup
Worker/engine/marqs/pubsub/socket singletons each construct an ioredis
client at import time (singleton() + no lazyConnect), so any test importing
the service graph opened real Redis connections on import. In CI there is no
Redis, so these accumulate infinite-retry clients across a shard and take
the suite down (locally they pass only because dev Redis is up).
Globally mock the eager-Redis modules to no-op stubs in test/setup.ts:
commonWorker, batchTriggerWorker, legacyRunEngineWorker, alertsWorker,
the RunEngine and MarQS singletons, devPubSub and the socket.io server.
Only these singletons are mocked — never the run store (~/v3/runStore.server,
~/db.server), which store-routing/residency tests need real against
testcontainer Postgres.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0ef3a6b commit 0db90f0
1 file changed
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments