Issue #12363: increase the timeout of siginterrupt() tests
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 1 Jul 2011 13:58:39 +0000 (15:58 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 1 Jul 2011 13:58:39 +0000 (15:58 +0200)
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).

Lib/test/test_signal.py

index bc7da197b9e6708602b3f45469907e62c29be8f8..ede6545397f868dda4f2476de135789536a597ff 100644 (file)
@@ -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()