Bug 1143380 - [mozrunner] Increase timeout value for waiting emulator to start; r=ahal a=test-only
authorEdgar Chen <echen@mozilla.com>
Tue, 22 Dec 2015 10:27:26 +0800
changeset 310721 7e1284abc4733ef0372cd96671cfaac3227e2214
parent 310720 4fdf6b0bed8b983745e919be1523a0fe9a2e8a44
child 310722 2db713b1c2fb3de36fedf95076c27e9e8c453b84
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal, test-only
bugs1143380
milestone45.0a2
Bug 1143380 - [mozrunner] Increase timeout value for waiting emulator to start; r=ahal a=test-only
testing/mozbase/mozrunner/mozrunner/devices/emulator.py
--- a/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
+++ b/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
@@ -112,17 +112,19 @@ class Emulator(Device):
             qemu_proc_args['processOutputLine'] = lambda line: None
         self.proc = ProcessHandler(self.args, **qemu_proc_args)
         self.proc.run()
 
         devices = set(self._get_online_devices())
         now = datetime.datetime.now()
         while (devices - original_devices) == set([]):
             time.sleep(1)
-            if datetime.datetime.now() - now > datetime.timedelta(seconds=60):
+            # Sometimes it takes more than 60s to launch emulator, so we
+            # increase timeout value to 180s. Please see bug 1143380.
+            if datetime.datetime.now() - now > datetime.timedelta(seconds=180):
                 raise TimeoutException('timed out waiting for emulator to start')
             devices = set(self._get_online_devices())
         devices = devices - original_devices
         self.serial = devices.pop()
         self.connect()
 
     def _get_online_devices(self):
         return set([d[0] for d in self.dm.devices() if d[1] != 'offline' if d[0].startswith('emulator')])