File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,11 +280,15 @@ def test_invalid_command(self):
280280
281281 server .start ()
282282
283- for _ in range (20 ):
283+ # Wait for socket to exist and server to be ready
284+ for _ in range (50 ):
284285 if os .path .exists (socket_path ):
285286 break
286287 time .sleep (0.1 )
287288
289+ # Extra wait for server to be fully ready
290+ time .sleep (0.2 )
291+
288292 try :
289293 with ControlClient (socket_path , timeout = 5.0 ) as client :
290294 with pytest .raises (Exception ) as exc_info :
@@ -326,6 +330,10 @@ def test_multiple_commands(self):
326330class TestControlSocketServerPermissions :
327331 """Tests for socket permissions."""
328332
333+ @pytest .mark .skipif (
334+ os .uname ().sysname == "FreeBSD" ,
335+ reason = "FreeBSD socket permissions behavior differs"
336+ )
329337 def test_socket_permissions (self ):
330338 """Test that socket is created with correct permissions."""
331339 with tempfile .TemporaryDirectory () as tmpdir :
@@ -336,11 +344,15 @@ def test_socket_permissions(self):
336344
337345 server .start ()
338346
339- for _ in range (20 ):
347+ # Wait for socket to exist
348+ for _ in range (50 ):
340349 if os .path .exists (socket_path ):
341350 break
342351 time .sleep (0.1 )
343352
353+ # Extra wait for chmod to complete
354+ time .sleep (0.2 )
355+
344356 try :
345357 mode = os .stat (socket_path ).st_mode & 0o777
346358 assert mode == 0o660
You can’t perform that action at this time.
0 commit comments