From 0297e0b6eee7a6a5ea81b48ffc16fa23e7e8c5d4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 22 Oct 2026 12:04:14 -0700 Subject: [PATCH] gh-133651: Increase multiprocessing test_interrupt() timeout (GH-160281) Increase timeout from 10 to at least 30 seconds (SHORT_TIMEOUT). (cherry picked from commit 7ee9ddda05fcfe558f9df83066d9fc3c377f33c5) Co-authored-by: Victor Stinner --- Lib/test/_test_multiprocessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index f30d9f779dc3492..ba0659a349808ef 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -616,10 +616,10 @@ def _kill_process(self, meth, target=None): # On the Gentoo buildbot waitpid() often seems to block forever. # We use alarm() to interrupt it if it blocks for too long. def handler(*args): - raise RuntimeError('join took too long: %s' % p) + raise RuntimeError(f'join took longer than {timeout} seconds: {p}') old_handler = signal.signal(signal.SIGALRM, handler) try: - signal.alarm(10) + signal.alarm(int(timeout)) self.assertEqual(join(), None) finally: signal.alarm(0)