]> granicus.if.org Git - python/commitdiff
(merge 3.2) Issue #12363: increase the timeout of siginterrupt() tests
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 1 Jul 2011 13:59:54 +0000 (15:59 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 1 Jul 2011 13:59:54 +0000 (15:59 +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).

1  2 
Lib/test/test_signal.py

index 311d0f09912697c255f812426071b107042e48eb,ede6545397f868dda4f2476de135789536a597ff..e5df000c737196b42784de8192a1283669a898a0
@@@ -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: