File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ async def test_nri_handshake(nri_server: NriServer) -> None:
2727 # Give it a moment to complete the registration handshake
2828 await asyncio .sleep (1.0 )
2929
30+ assert nri_server is not None
3031 logger .info ("NRI handshake completed successfully" )
3132
3233
@@ -85,10 +86,17 @@ async def test_nri_server_lifecycle(
8586 for _ in range (50 ):
8687 if socket_path .exists ():
8788 break
89+ if proc .returncode is not None :
90+ stdout , stderr = await proc .communicate ()
91+ pytest .fail (
92+ f"Test server exited prematurely (code { proc .returncode } )\n "
93+ f"stdout: { stdout .decode ()} \n stderr: { stderr .decode ()} "
94+ )
8895 await asyncio .sleep (0.1 )
8996 else :
90- proc .terminate ()
91- await proc .wait ()
97+ if proc .returncode is None :
98+ proc .terminate ()
99+ await proc .wait ()
92100 pytest .fail ("Test server socket not created" )
93101
94102 # Create and start server
You can’t perform that action at this time.
0 commit comments