Commit f5d5929
committed
Stabilize idle-timeout coverage under CI timing
The new session_idle_timeout tests started exercising two paths the existing source annotations and timing assumptions no longer matched. CI's strict-no-cover gate now observes the session_manager return path, and the idle-reap assertion can race under slower coverage-instrumented runs. This follow-up removes the stale pragma and makes the idle-reap assertion wait for actual session removal before checking the 404 behavior.
Constraint: Must preserve the PR's runtime semantics and only address CI-validity drift
Rejected: Increase fixed sleeps again | keeps the test timing-sensitive and flaky under slower environments
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Prefer state-based waits over fixed sleeps in StreamableHTTP timeout tests
Tested: uv run --frozen pytest tests/server/test_streamable_http_manager.py; coverage run of the same suite; strict-no-cover-sensitive paths exercised locally
Not-tested: Full upstream matrix rerun after push1 parent e921e8f commit f5d5929
File tree
2 files changed
+6
-3
lines changed- src/mcp/server/lowlevel
- tests/server
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
389 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
| |||
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
| 404 | + | |
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
| |||
0 commit comments