Compare commits
1 Commits
fix/flaky-
...
fix/deploy
| Author | SHA1 | Date | |
|---|---|---|---|
| 05a48c2230 |
@@ -601,21 +601,9 @@ class TestCoordinatorIntegration:
|
|||||||
coordinator = Coordinator(queue_manager=queue_manager, poll_interval=0.02)
|
coordinator = Coordinator(queue_manager=queue_manager, poll_interval=0.02)
|
||||||
|
|
||||||
task = asyncio.create_task(coordinator.start())
|
task = asyncio.create_task(coordinator.start())
|
||||||
|
await asyncio.sleep(0.5) # Allow time for processing
|
||||||
# Poll for completion with timeout instead of fixed sleep
|
|
||||||
deadline = asyncio.get_event_loop().time() + 5.0 # 5 second timeout
|
|
||||||
while asyncio.get_event_loop().time() < deadline:
|
|
||||||
all_completed = True
|
|
||||||
for i in range(157, 162):
|
|
||||||
item = queue_manager.get_item(i)
|
|
||||||
if item is None or item.status != QueueItemStatus.COMPLETED:
|
|
||||||
all_completed = False
|
|
||||||
break
|
|
||||||
if all_completed:
|
|
||||||
break
|
|
||||||
await asyncio.sleep(0.05)
|
|
||||||
|
|
||||||
await coordinator.stop()
|
await coordinator.stop()
|
||||||
|
|
||||||
task.cancel()
|
task.cancel()
|
||||||
try:
|
try:
|
||||||
await task
|
await task
|
||||||
|
|||||||
Reference in New Issue
Block a user