tests: shorten post-test sleeps stable
authorMatt Mackall <mpm@selenic.com>
Mon, 02 Apr 2012 17:02:03 -0500
branchstable
changeset 1059 1745fd2dd308
parent 1057 66d2754c6f30
child 1060 2d2d93380694
child 1061 70b4494ccf1d
tests: shorten post-test sleeps This helps expose races [ original upstream message ]
tests/run-tests.py
--- a/tests/run-tests.py	Fri Mar 30 22:08:46 2012 +0100
+++ b/tests/run-tests.py	Mon Apr 02 17:02:03 2012 -0500
@@ -75,7 +75,7 @@
         def t():
             start = time.time()
             while time.time() - start < timeout and p.returncode is None:
-                time.sleep(1)
+                time.sleep(.1)
             p.timeout = True
             if p.returncode is None:
                 terminate(p)
@@ -360,7 +360,7 @@
                 os.kill(pid, 0)
                 vlog('# Killing daemon process %d' % pid)
                 os.kill(pid, signal.SIGTERM)
-                time.sleep(0.25)
+                time.sleep(0.1)
                 os.kill(pid, 0)
                 vlog('# Daemon process %d is stuck - really killing it' % pid)
                 os.kill(pid, signal.SIGKILL)
@@ -1275,7 +1275,7 @@
         else:
             runtests(options, tests)
     finally:
-        time.sleep(1)
+        time.sleep(.1)
         cleanup(options)
 
 if __name__ == '__main__':