Repository navigation
Commit 6ca8593
test: read the full event stream before asserting in the resubscription test (a2aproject#1406)
**What this changes**
`test_task_resubscription` now reads the full SSE stream before
asserting, instead of breaking out of the read loop after the first
chunk.
**Why**
The test broke out of the loop as soon as it had read one SSE event,
then asserted that the second and third artifact events were also
present. That only holds when the first network read happens to contain
every event. On platforms where the first read returns a single event,
for example on Windows, `artifact-1` and `artifact-2` were not in the
buffer yet and the assertions failed.
Reproduced on Windows with Python 3.13: `test_task_resubscription`
failed on every run before this change and passes on every run after it.
The rest of `tests/server/test_integration.py` keeps passing (30
passed).
**The fix**
Drop the early break so the loop drains the stream, matching the sibling
`test_message_send_stream`, which already reads to completion before
asserting. The server behavior under test is unchanged; only the test's
read loop changes.
---------
Co-authored-by: mykytanetipa <mykytanetipa@google.com>1 parent aa8e966 commit 6ca8593
1 file changed
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | 685 | | |
690 | 686 | | |
691 | 687 | | |
| |||
0 commit comments