diff --git a/tests/unit_tests/test_axon.py b/tests/unit_tests/test_axon.py index 20fdee4369..d236745875 100644 --- a/tests/unit_tests/test_axon.py +++ b/tests/unit_tests/test_axon.py @@ -16,6 +16,7 @@ # DEALINGS IN THE SOFTWARE. +import asyncio import contextlib import re import threading @@ -816,6 +817,9 @@ async def lifespan(app): server_started.wait() + while not server.started or server_stopped.is_set(): + await asyncio.sleep(1) + assert server.is_running is True async with aiohttp.ClientSession(