fastmcp/tests/server/tasks
Jeremiah Lowin 32f1118a11
Expose minimum_check_interval, reduce task pickup latency (#3500)
* perf: expose minimum_check_interval, reduce task pickup latency

The Docket Worker polls for new tasks every minimum_check_interval
(previously hardcoded to 250ms in pydocket). Expose this setting so
users can tune it, default to 50ms, and override to 10ms in tests.

This cuts average task pickup latency from ~125ms to ~5ms per task.

* perf: reduce task test overhead and eliminate cross-test contamination

- Expose minimum_check_interval setting (default 50ms, 10ms in tests)
  to reduce Docket Worker task pickup latency
- Isolate fakeredis per test via unique memory:// URLs to prevent
  stale _async_blocking tasks from contaminating subsequent tests
- Make client disconnect timeout configurable (default 5s, 1s in tests)
- Add --durations=50 to CI for passive performance regression detection
- Remove 15s timeout band-aids from task test conftest files
- Add explicit @pytest.mark.timeout(10) to cancellation tests
- Fix deprecated FastMCP.as_proxy() usage in test_task_proxy.py
2026-03-14 16:08:28 -04:00
..
__init__.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
conftest.py Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
test_context_background_task.py fix: propagate origin_request_id to background task workers (#3175) 2026-02-22 11:16:30 -05:00
test_custom_subclass_tasks.py Add component versioning and VersionFilter transform (#2894) 2026-01-16 20:53:18 -05:00
test_notifications.py Move relay logic to elicitation.py, fix related-task metadata key 2026-02-10 16:00:01 -05:00
test_progress_dependency.py Remove enable_docket setting; Docket is now always on 2025-12-05 11:40:04 -05:00
test_resource_task_meta_parameter.py Add task_meta to prompts and centralize fn_key enrichment (#2751) 2025-12-26 15:04:25 -05:00
test_server_tasks_parameter.py Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
test_sync_function_task_disabled.py Decorators return functions instead of component objects (#2856) 2026-01-12 21:58:07 -05:00
test_task_capabilities.py Fix task capabilities location (issue #2870) 2026-01-13 22:26:13 -05:00
test_task_config.py Unify component storage in LocalProvider (#2680) 2025-12-23 19:24:09 -05:00
test_task_dependencies.py Replace vendored DI with uncalled-for (#3301) 2026-03-02 16:35:15 -05:00
test_task_elicitation_relay.py Relay task elicitation through standard MCP protocol 2026-02-10 14:58:19 -05:00
test_task_meta_parameter.py Add loq file size limits and clean up type ignores (#2859) 2026-01-13 07:29:12 -05:00
test_task_metadata.py Move relay logic to elicitation.py, fix related-task metadata key 2026-02-10 16:00:01 -05:00
test_task_methods.py Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
test_task_mount.py Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
test_task_prompts.py Refactor Client class into mixins and add timeout utilities (#2933) 2026-01-19 09:54:47 -05:00
test_task_protocol.py fix: stabilize task notification integration tests 2026-02-08 15:20:22 +01:00
test_task_proxy.py Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
test_task_resources.py Refactor Client class into mixins and add timeout utilities (#2933) 2026-01-19 09:54:47 -05:00
test_task_return_types.py fix: propagate origin_request_id to background task workers (#3175) 2026-02-22 11:16:30 -05:00
test_task_security.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_status_notifications.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_tools.py Refactor Client class into mixins and add timeout utilities (#2933) 2026-01-19 09:54:47 -05:00
test_task_ttl.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00