Skip to content

Commit 7d394aa

Browse files
committed
Fix tests
1 parent e499937 commit 7d394aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/durabletask/test_worker_concurrency_loop_async.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ async def run_test():
7373
# Clear stub state before each run
7474
stub.completed.clear()
7575
worker_task = asyncio.create_task(grpc_worker._async_worker_manager.run())
76+
# Need to yield to that thread in order to let it start up on the second run
77+
startup_attempts = 0
78+
while grpc_worker._async_worker_manager._shutdown and startup_attempts < 10:
79+
await asyncio.sleep(0.1)
80+
startup_attempts += 1
7681
for req in orchestrator_requests:
7782
grpc_worker._async_worker_manager.submit_orchestration(dummy_orchestrator, cancel_dummy_orchestrator, req, stub, DummyCompletionToken())
7883
for req in activity_requests:

0 commit comments

Comments
 (0)