From 720f6d1a86b37a596422bb29200e156d2acb604b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2026 19:26:37 +0000 Subject: [PATCH] test(mcp): preserve guardrail fixture worker affinity --- tests/integration/mcp/test_mcp_accounting_guardrails.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/mcp/test_mcp_accounting_guardrails.py b/tests/integration/mcp/test_mcp_accounting_guardrails.py index 594950a9c13..a276718c280 100644 --- a/tests/integration/mcp/test_mcp_accounting_guardrails.py +++ b/tests/integration/mcp/test_mcp_accounting_guardrails.py @@ -348,7 +348,7 @@ def hooks_rig(tmp_path_factory: pytest.TempPathFactory) -> Iterator[HooksRig]: path.write_text(yaml.safe_dump(config)) with ( gateway_from_environment() as gateway, - owned_proxy(gateway, directory, {}, config=path, workers=2) as candidate, + owned_proxy(gateway, directory, {"KEEPALIVE_TIMEOUT": "120"}, config=path, workers=2) as candidate, owned_proxy(gateway, directory, {}, config=path) as sibling, ): yield HooksRig(candidate, sibling, sink, guardrail) @@ -364,7 +364,7 @@ def _worker(gateway: Gateway) -> int: @contextmanager def _pinned(gateway: Gateway) -> Generator[tuple[Gateway, int], None, None]: - limits: Final = httpx.Limits(max_connections=1, max_keepalive_connections=1) + limits: Final = httpx.Limits(max_connections=1, max_keepalive_connections=1, keepalive_expiry=120) with httpx.Client(base_url=gateway.client.base_url, timeout=15, trust_env=False, limits=limits) as client: pinned: Final = Gateway(client, gateway.key, gateway.upstream_url) yield pinned, _worker(pinned)