If a test times out, launch the next test, not browser. Reduce timeout appropriately.
authorMark Cote <mcote@mozilla.com>
Tue, 27 Sep 2011 15:18:28 -0400
changeset 70 b4c4650b24a561a59c8b1d044a9bfd5a5b7ad589
parent 69 b1ea4343f89c8d02fa7ce91d6b6988c96253b00e
child 71 360d8f20b4de7cdbbc531a50c600936dbd29a8b9
push id68
push usermcote@mozilla.com
push dateTue, 27 Sep 2011 19:18:35 +0000
If a test times out, launch the next test, not browser. Reduce timeout appropriately.
client/speedtests.py
--- a/client/speedtests.py
+++ b/client/speedtests.py
@@ -551,17 +551,17 @@ class TestRunnerRequestHandler(BaseHTTPS
         self.wfile.write('<html></html>')
         self.server.browser_runner.next_test()
 
     def log_message(self, format, *args):
         """ Suppress log output. """
         return
 
 
-MAX_TEST_TIME = datetime.timedelta(seconds=60*10)
+MAX_TEST_TIME = datetime.timedelta(seconds=60*5)
         
 def main():
     from optparse import OptionParser
     parser = OptionParser()
     parser.add_option('-t', '--test', dest='tests', action='append', default=[])
     parser.add_option('--testmode', dest='testmode', action='store_true')
     parser.add_option('-n', '--noresults', dest='noresults', action='store_true')
     (options, args) = parser.parse_args()
@@ -611,21 +611,21 @@ def main():
     start = datetime.datetime.now()
     br.launch_next_browser()
     while not evt.is_set():
         if br.browser_running():
             if evt.is_set():
                 # evt may have been set while we were waiting for the lock in browser_running().
                 break
             if br.execution_time() > MAX_TEST_TIME:
-                print 'Test has taken too long; starting next browser'
-                br.launch_next_browser()
+                print 'Test has taken too long; starting next test.'
+                br.next_test()
         else:
             print 'Browser isn\'t running!'
-            br.launch_next_browser()
+            br.next_test()
         evt.wait(5)
     trs.shutdown()
     server_thread.join()
     end = datetime.datetime.now()
     print ''
     print 'Done!'
 
     if not config.testmode: