From: Victor Stinner Date: Fri, 1 Jul 2011 13:59:54 +0000 (+0200) Subject: (merge 3.2) Issue #12363: increase the timeout of siginterrupt() tests X-Git-Tag: v3.3.0a1~1986 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19e5bcdd9c0570bb986225ab0a86379828bfa9eb;p=python (merge 3.2) Issue #12363: increase the timeout of siginterrupt() tests Move also the "ready" trigger after the installation of the signal handler and the call to siginterrupt(). Use a timeout of 5 seconds instead of 3. Two seconds are supposed to be enough, but some of our buildbots are really slow (especially the FreeBSD 6 VM). --- 19e5bcdd9c0570bb986225ab0a86379828bfa9eb diff --cc Lib/test/test_signal.py index 311d0f0991,ede6545397..e5df000c73 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@@ -384,8 -328,18 +384,8 @@@ class SiginterruptTest(unittest.TestCas # wait until the child process is loaded and has started first_line = process.stdout.readline() - stdout, stderr = process.communicate(timeout=3.0) - # Wait the process with a timeout of 5 seconds - timeout = time.time() + 5.0 - while True: - if timeout < time.time(): - raise Timeout() - status = process.poll() - if status is not None: - break - time.sleep(0.1) - - stdout, stderr = process.communicate() - except Timeout: ++ stdout, stderr = process.communicate(timeout=5.0) + except subprocess.TimeoutExpired: process.kill() return False else: