summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_signal.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-01 13:58:39 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-01 13:58:39 (GMT)
commitdfde0d465071e9a261ddf02d333401f4c7ada579 (patch)
tree61f030fb16a4953f0aa0d2711392d8e54b937759 /Lib/test/test_signal.py
parent8d64248c6951aa052e45f39cc7d982f6bbcf5a2c (diff)
downloadcpython-dfde0d465071e9a261ddf02d333401f4c7ada579.zip
cpython-dfde0d465071e9a261ddf02d333401f4c7ada579.tar.gz
cpython-dfde0d465071e9a261ddf02d333401f4c7ada579.tar.bz2
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.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index bc7da19..ede6545 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -302,13 +302,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)
@@ -328,8 +328,8 @@ class SiginterruptTest(unittest.TestCase):
# wait until the child process is loaded and has started
first_line = process.stdout.readline()
- # Wait the process with a timeout of 3 seconds
- timeout = time.time() + 3.0
+ # Wait the process with a timeout of 5 seconds
+ timeout = time.time() + 5.0
while True:
if timeout < time.time():
raise Timeout()