Commit aa97562
committed
fix(devframe): stop mcp-http tests from sharing a port
Every test in mcp-http.test.ts booted its dev server on the same
default port (9999). Since Node's global fetch() (undici) pools
keep-alive sockets per origin, a later test could get handed a
stale socket left over from an earlier test's already-closed
server — failing instantly with a socket error, or leaving the
earlier server's close() hanging until undici's keep-alive
timeout released it. This was flaking CI's unit-test job on
every platform/Node version.
Pass port: 0 so each boot() gets a fresh OS-assigned port,
eliminating the origin collision entirely.
🤖 Generated with an agent (opencode).1 parent c96ace5 commit aa97562
1 file changed
Lines changed: 10 additions & 2 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | | - | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
0 commit comments