File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,11 @@ async def test_a2a_pydantic_model_output():
86
86
task_id = result ['id' ]
87
87
88
88
# Wait for completion
89
- await anyio .sleep (0.1 )
90
- task = await a2a_client .get_task (task_id )
91
-
92
- assert 'result' in task
93
- result = task ['result' ]
94
- assert result ['status' ]['state' ] == 'completed'
89
+ while task := await a2a_client .get_task (task_id ): # pragma: no branch
90
+ if 'result' in task and task ['result' ]['status' ]['state' ] == 'completed' :
91
+ result = task ['result' ]
92
+ break
93
+ await anyio .sleep (0.1 )
95
94
96
95
# Check artifacts
97
96
assert 'artifacts' in result
@@ -198,6 +197,7 @@ async def test_a2a_simple():
198
197
if 'result' in task and task ['result' ]['status' ]['state' ] == 'completed' :
199
198
break
200
199
await anyio .sleep (0.1 )
200
+
201
201
assert task == snapshot (
202
202
{
203
203
'jsonrpc' : '2.0' ,
You can’t perform that action at this time.
0 commit comments