Skip to content

Commit 2ab4ad0

Browse files
authored
Merge pull request #14 from sacha-development-stuff/codex/fix-notification-assertion-error-in-test_streamablehttp_clie
Fix race in resumption test
2 parents 8fdc5f9 + 9f7ae6c commit 2ab4ad0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/shared/test_streamable_http.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,12 @@ async def run_tool():
11561156
assert result.content[0].type == "text"
11571157
assert "Completed" in result.content[0].text
11581158

1159+
# Allow any pending notifications to be processed
1160+
for _ in range(50):
1161+
if captured_notifications:
1162+
break
1163+
await anyio.sleep(0.1)
1164+
11591165
# We should have received the remaining notifications
11601166
assert len(captured_notifications) > 0
11611167

0 commit comments

Comments
 (0)