summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_signal.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-01 13:59:54 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-01 13:59:54 (GMT)
commit19e5bcdd9c0570bb986225ab0a86379828bfa9eb (patch)
tree16e6611ebe16470ebcae3e93044966883588a63d /Lib/test/test_signal.py
parent77c7218e3701a55e9412eee37c84eb4249bf8de2 (diff)
parentdfde0d465071e9a261ddf02d333401f4c7ada579 (diff)
downloadcpython-19e5bcdd9c0570bb986225ab0a86379828bfa9eb.zip
cpython-19e5bcdd9c0570bb986225ab0a86379828bfa9eb.tar.gz
cpython-19e5bcdd9c0570bb986225ab0a86379828bfa9eb.tar.bz2
(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).
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r--Lib/test/test_signal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 311d0f0..e5df000 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -358,13 +358,13 @@ class SiginterruptTest(unittest.TestCase):
def handler(signum, frame):
pass
- print("ready")
- sys.stdout.flush()
-
signal.signal(signal.SIGALRM, handler)
if interrupt is not None:
signal.siginterrupt(signal.SIGALRM, interrupt)
+ print("ready")
+ sys.stdout.flush()
+
# run the test twice
for loop in range(2):
# send a SIGALRM in a second (during the read)
@@ -384,7 +384,7 @@ class SiginterruptTest(unittest.TestCase):
# wait until the child process is loaded and has started
first_line = process.stdout.readline()
- stdout, stderr = process.communicate(timeout=3.0)
+ stdout, stderr = process.communicate(timeout=5.0)
except subprocess.TimeoutExpired:
process.kill()
return False