mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 13:04:18 +02:00
* fix: shield lifespan teardown from cancellation Co-authored-by: Claude <noreply@anthropic.com> * fix: stabilize flaky task and timeout tests under parallel execution Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
15 lines
542 B
Python
15 lines
542 B
Python
"""Configuration for client task tests.
|
|
|
|
Task tests require Docket infrastructure (Redis-backed task queue) which can
|
|
take significant time to initialize, especially under parallel test execution.
|
|
The default 5s timeout is too tight for these tests.
|
|
"""
|
|
|
|
import pytest
|
|
|
|
|
|
def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
|
|
"""Increase timeout for task tests that need Docket infrastructure."""
|
|
for item in items:
|
|
if not item.get_closest_marker("timeout"):
|
|
item.add_marker(pytest.mark.timeout(15))
|