Skip to content

Commit 68255f7

Browse files
committed
Fix Windows CI timing in test_early_parent_exit
1 parent 9da6b5f commit 68255f7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/client/test_stdio.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,15 @@ def handle_term(sig, frame):
483483
# Start the parent process
484484
proc = await _create_platform_compatible_process(sys.executable, ["-c", parent_script])
485485

486-
# Let child start writing
487-
await anyio.sleep(0.5)
486+
# Let child start writing (Windows CI with Python 3.10 needs
487+
# extra time for the grandchild to import and begin I/O)
488+
startup_delay = 2.0 if sys.platform == "win32" else 0.5
489+
await anyio.sleep(startup_delay)
488490

489491
# Verify child is writing
490492
if os.path.exists(marker_file): # pragma: no cover
491493
size1 = os.path.getsize(marker_file)
492-
await anyio.sleep(0.3)
494+
await anyio.sleep(0.5)
493495
size2 = os.path.getsize(marker_file)
494496
assert size2 > size1, "Child should be writing"
495497

0 commit comments

Comments
 (0)