Skip to content

Commit

Permalink
tests: add timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzniewski-reef committed Feb 3, 2025
1 parent 321d359 commit e6d00ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit_tests/test_axon.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,11 @@ async def lifespan(app):
)
server.start()

server_started.wait()
server_started.wait(3.0)

while not (server.started or server_stopped.is_set()):
await asyncio.sleep(1)
async with asyncio.timeout(3.0):
while not (server.started or server_stopped.is_set()):
await asyncio.sleep(1.0)

assert server.is_running is True

Expand Down

0 comments on commit e6d00ad

Please sign in to comment.