From b0c856c971b36617eefc20a68550bbd657e2c7fe Mon Sep 17 00:00:00 2001 From: Roman Lutz Date: Sat, 14 Nov 2026 21:08:25 -0800 Subject: [PATCH] TEST: Assert concurrent-send independence without a latency budget Keep the first send gated until its unrelated peer finishes. Preserve the existing ordering assertions and ten-second hang watchdog. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/unit/backend/test_message_send_service.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/unit/backend/test_message_send_service.py b/tests/unit/backend/test_message_send_service.py index 50fc1d8ef2..98bb0226b9 100644 --- a/tests/unit/backend/test_message_send_service.py +++ b/tests/unit/backend/test_message_send_service.py @@ -1894,6 +1894,7 @@ async def test_queued_send_uses_the_validated_target_async( async def test_rate_limited_and_converter_sends_allow_unrelated_sends_async( self, *, mock_memory: MagicMock, send_dependencies: tuple[MagicMock, AsyncMock], kind: str ) -> None: + """Require unrelated completion before releasing the first send, not a latency budget.""" target_service, send = send_dependencies scheduler = ManualSendScheduler(max_concurrency=2, max_operations=3) service = MessageSendService(scheduler=scheduler) @@ -1921,10 +1922,7 @@ async def hold_async(*, conversation_id: str, **_: Any) -> None: active = asyncio.create_task(service.add_message_async(attack_result_id="attack", request=first)) try: await first_started.wait() - await asyncio.wait_for( - service.add_message_async(attack_result_id="attack", request=_request(conversation_id="second")), - timeout=3, - ) + await service.add_message_async(attack_result_id="attack", request=_request(conversation_id="second")) assert order == ["main", "second"] assert not active.done() finally: