Skip to content

Commit 80b548a

Browse files
pentschevmadsbk
andauthored
Kill process if join timed out
Co-authored-by: Mads R. B. Kristensen <madsbk@gmail.com>
1 parent 19a890c commit 80b548a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

python/rapidsmpf/rapidsmpf/tests/test_rrun.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ def _wrapper() -> None:
4747
proc.start()
4848
proc.join(timeout=30)
4949

50+
if proc.is_alive():
51+
proc.kill()
52+
proc.join()
53+
raise RuntimeError("Subprocess timed out after 30 seconds")
54+
5055
if parent_conn.poll():
5156
exc = parent_conn.recv()
5257
if exc is not None:

0 commit comments

Comments
 (0)