Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/unit/backend/test_message_send_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
Loading