Repository navigation
Commit 5c4b93b
test(service-cluster-redis): de-flake Redis wiring test (hoist cold imports) (#1495)
The "Redis driver — wiring" tests did `await import('./index.js')` +
`await import('@objectstack/service-cluster')` inside the test body, under the
default 5000ms timeout. On a cold/slow CI runner the one-time module load
exceeded 5s and the first test failed with "Test timed out in 5000ms" (the
second only passed because the first warmed the module cache) — an
intermittent red on Test Core unrelated to any product change.
Hoist both to top-level static imports: `import './index.js'` still registers
the 'redis' driver as a side-effect at module eval, and `defineCluster` is a
normal named export. The import cost now lands once at file load, outside any
per-test timeout. Test assertions are unchanged.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6bc3b18 commit 5c4b93b
2 files changed
Lines changed: 12 additions & 4 deletions
File tree
- .changeset
- packages/services/service-cluster-redis/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
121 | | - | |
122 | | - | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| |||
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
148 | | - | |
149 | | - | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| |||
0 commit comments