File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,17 @@ async def watch_activities():
5151 # wait for events to be processed
5252 for _ in range (120 ):
5353 scans = [s async for s in bbot_server .get_scans ()]
54+
5455 if len (scans ) == 1 and scans [0 ].status == "FINISHED" :
55- break
56+ scan_activities = [a for a in activities if a .type .startswith ("SCAN_" )]
57+ scan_statuses = [a .detail ["scan_status" ] for a in scan_activities ]
58+ if scan_activities == ["SCAN_STATUS" , "SCAN_STATUS" ] and scan_statuses == ["RUNNING" , "FINISHED" ]:
59+ break
60+
5661 await asyncio .sleep (0.5 )
5762 else :
5863 assert False , "Scan did not finish"
5964
60- assert [a .type for a in activities if a .type .startswith ("SCAN_" )] == ["SCAN_STATUS" , "SCAN_STATUS" ]
61- assert [a .detail ["scan_status" ] for a in activities if a .type .startswith ("SCAN_" )] == ["RUNNING" , "FINISHED" ]
62-
6365 activity_task .cancel ()
6466 with suppress (asyncio .CancelledError ):
6567 await activity_task
You can’t perform that action at this time.
0 commit comments