Skip to content

Commit e6d00ad

Browse files
tests: add timeouts
1 parent 321d359 commit e6d00ad

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unit_tests/test_axon.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,10 +815,11 @@ async def lifespan(app):
815815
)
816816
server.start()
817817

818-
server_started.wait()
818+
server_started.wait(3.0)
819819

820-
while not (server.started or server_stopped.is_set()):
821-
await asyncio.sleep(1)
820+
async with asyncio.timeout(3.0):
821+
while not (server.started or server_stopped.is_set()):
822+
await asyncio.sleep(1.0)
822823

823824
assert server.is_running is True
824825

0 commit comments

Comments
 (0)