File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -310,14 +310,14 @@ async def test_allows_multiple_run_calls(system_status: SystemStatus | Mock) ->
310310 done_count = 0
311311
312312 async def run () -> None :
313- await asyncio .sleep (0.1 )
314313 nonlocal done_count
315314 done_count += 1
315+ await asyncio .sleep (0.1 )
316316
317317 pool = AutoscaledPool (
318318 system_status = system_status ,
319319 run_task_function = run ,
320- is_task_ready_function = lambda : future (True ),
320+ is_task_ready_function = lambda : future (done_count < 4 ),
321321 is_finished_function = lambda : future (done_count >= 4 ),
322322 concurrency_settings = ConcurrencySettings (
323323 min_concurrency = 4 ,
@@ -330,8 +330,6 @@ async def run() -> None:
330330 assert done_count == 4
331331
332332 done_count = 0
333- await asyncio .sleep (0.2 ) # Allow any lingering callbacks to complete
334- done_count = 0 # Reset again to ensure clean state
335333
336334 await pool .run ()
337335 assert done_count == 4
You can’t perform that action at this time.
0 commit comments