Skip to content

Commit

Permalink
test: wait for uvicorn server to start completly
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzniewski-reef committed Jan 22, 2025
1 parent 0958209 commit d5753db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit_tests/test_axon.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# DEALINGS IN THE SOFTWARE.


import asyncio
import contextlib
import re
import threading
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d5753db

Please sign in to comment.