Skip to content

Commit 321d359

Browse files
test: wait for uvicorn server to start completly
1 parent 0958209 commit 321d359

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/unit_tests/test_axon.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# DEALINGS IN THE SOFTWARE.
1717

1818

19+
import asyncio
1920
import contextlib
2021
import re
2122
import threading
@@ -816,6 +817,9 @@ async def lifespan(app):
816817

817818
server_started.wait()
818819

820+
while not (server.started or server_stopped.is_set()):
821+
await asyncio.sleep(1)
822+
819823
assert server.is_running is True
820824

821825
async with aiohttp.ClientSession(

0 commit comments

Comments
 (0)