Skip to content

Commit

Permalink
Fix test to work with older version of Python.
Browse files Browse the repository at this point in the history
  • Loading branch information
gersh committed Aug 6, 2024
1 parent 15ac37e commit f5ff15d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/integration/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ async def test_tasks_for_add(celery_worker: Any) -> None:
# Wait for the batch to be processed
results = await asyncio.wait_for(
asyncio.gather(
asyncio.to_thread(result_1.get), asyncio.to_thread(result_2.get)
asyncio.get_event_loop().run_in_executor(None, result_1.get),
asyncio.get_event_loop().run_in_executor(None, result_2.get),
),
timeout=5.0,
)
Expand Down

0 comments on commit f5ff15d

Please sign in to comment.