You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky integration test: inspectorClient-timeout-diagnostics 'emits connectionDiagnosticsChange' reads an undefined GET log entry #2580
clients/web/src/test/integration/mcp/inspectorClient-timeout-diagnostics.test.ts > InspectorClient request-timeout diagnostics (#2318) > emits connectionDiagnosticsChange as the state moves, and counts stream events fails intermittently:
On current v2/main (9393237), running the file alone fails roughly 2 runs in 3 on a loaded machine:
cd clients/web
foriin 1 2 3;do npx vitest run --project integration src/test/integration/mcp/inspectorClient-timeout-diagnostics.test.ts;done
It also went red in a full npm run local:gate for an unrelated TUI-only change (#2436).
Likely cause (unverified)
The FetchRequestLogState is constructed afterconnectTo(...) resolves, so the notification-stream GET can be dispatched/logged before the log subscribes; find(... method === "GET")! then returns undefined and the non-null assertion hides it. Constructing the log before connecting, or waiting on the GET entry rather than asserting it, should make it deterministic (per #1596: fix with an awaited condition, never headroom).
Activity
cliffhall commentedon Oct 7, 2026
Shipped in #2612 (merged to v2/main).
Merge pull request #2612 from modelcontextprotocol/v2/fix/2580-timeou…
test(web): subscribe the fetch log before connecting in timeout-diagn…