Skip to content

Commit 25787aa

Browse files
committed
Revert "fix(tests): stabilize child process cleanup under CI load"
This reverts commit 8f1b17f.
1 parent 8f1b17f commit 25787aa

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

tests/client/test_stdio.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -480,17 +480,12 @@ def handle_term(sig, frame):
480480
# Let child start writing
481481
await anyio.sleep(0.5)
482482

483-
# Verify child is writing. This can be slow/flaky under CI load, so poll up to a bounded timeout.
483+
# Verify child is writing
484484
if os.path.exists(marker_file): # pragma: no branch
485-
initial_size = os.path.getsize(marker_file)
486-
deadline = anyio.current_time() + 5.0
487-
while anyio.current_time() < deadline:
488-
await anyio.sleep(0.1)
489-
current_size = os.path.getsize(marker_file)
490-
if current_size > initial_size: # pragma: no branch
491-
break
492-
else: # pragma: no cover
493-
raise AssertionError("Child should be writing")
485+
size1 = os.path.getsize(marker_file)
486+
await anyio.sleep(0.3)
487+
size2 = os.path.getsize(marker_file)
488+
assert size2 > size1, "Child should be writing"
494489

495490
# Terminate - this will kill the process group even if parent exits first
496491
await _terminate_process_tree(proc)

0 commit comments

Comments
 (0)