@@ -82,25 +82,21 @@ def run_client(example_dir, use_middle=False):
8282 )
8383
8484 # Wait for client to complete
85- stdout , _ = client_proc .communicate (timeout = 1 )
86-
87- if client_proc .returncode != 0 :
88- pytest .fail (
89- f"Client failed with return code { client_proc .returncode } . Output: { stdout } "
90- )
85+ stdout , _ = client_proc .communicate (timeout = 2 )
86+ print (f"Client stdout: { stdout } " )
9187
9288 return stdout
9389
9490
95- def stop_process (process ):
91+ def stop_process (name , process ):
9692 """Stop a running process and capture its output"""
9793 process .terminate ()
9894 stdout , _ = process .communicate (timeout = 1 )
95+ print (f"{ name } : { stdout } " )
9996 return stdout
10097
10198
10299@pytest .mark .asyncio
103- @pytest .mark .skip (reason = "Graham working on it" )
104100async def test_direct_connection_cancellation (example_dir , server_process ):
105101 """Test cancellation with direct client-server connection"""
106102 # Run the client (direct connection)
@@ -110,7 +106,7 @@ async def test_direct_connection_cancellation(example_dir, server_process):
110106 await asyncio .sleep (1 )
111107
112108 # Capture server output
113- server_output = stop_process (server_process )
109+ server_output = stop_process ("server_process" , server_process )
114110
115111 # Assert expected messages
116112 assert (
@@ -122,7 +118,6 @@ async def test_direct_connection_cancellation(example_dir, server_process):
122118
123119
124120@pytest .mark .asyncio
125- @pytest .mark .skip (reason = "Graham working on it" )
126121async def test_middle_server_cancellation (
127122 example_dir , server_process , middle_server_process
128123):
@@ -134,8 +129,8 @@ async def test_middle_server_cancellation(
134129 await asyncio .sleep (1 )
135130
136131 # Capture output from all processes
137- server_output = stop_process (server_process )
138- middle_output = stop_process (middle_server_process )
132+ server_output = stop_process ("server_process" , server_process )
133+ middle_output = stop_process ("middle_server_process" , middle_server_process )
139134
140135 # Assert expected messages
141136 assert (
0 commit comments