From 9f7ae6c96860b9455d607288e407714de4f165f1 Mon Sep 17 00:00:00 2001 From: Sacha <55644767+SoldierSacha@users.noreply.github.com> Date: Tue, 17 Jun 2025 18:49:33 -0700 Subject: [PATCH] test: stabilize resumption notifications --- tests/shared/test_streamable_http.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/shared/test_streamable_http.py b/tests/shared/test_streamable_http.py index 1ffcc13b0..88633a0e0 100644 --- a/tests/shared/test_streamable_http.py +++ b/tests/shared/test_streamable_http.py @@ -1156,6 +1156,12 @@ async def run_tool(): assert result.content[0].type == "text" assert "Completed" in result.content[0].text + # Allow any pending notifications to be processed + for _ in range(50): + if captured_notifications: + break + await anyio.sleep(0.1) + # We should have received the remaining notifications assert len(captured_notifications) > 0