Commit de1b5da
fix: mock sleep in retry tests to prevent OOM + use single thread
1. Mocked client.sleep() in mcp-client-core-part2.test.js error counting tests
- Tests were taking 3005ms each with real retries (1000ms + 2000ms delays)
- Now take ~1ms with mocked sleep
- Reduces async work and memory pressure
2. Changed vitest config to singleThread: true
- Reduces worker thread memory pressure
- Tests still pass, just slightly slower
The OOM issue is caused by cumulative memory pressure from 14 test files
running together. Even with these fixes, OOM still occurs but is improved.
Further investigation needed - may need to split more files or increase
Node memory limit in CI.
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>1 parent 3bc9b24 commit de1b5da
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
368 | 371 | | |
369 | 372 | | |
370 | 373 | | |
| |||
386 | 389 | | |
387 | 390 | | |
388 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
389 | 395 | | |
390 | 396 | | |
391 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments