зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1416747 - [marionette] Hardening test_cli_arguments.py TestCommandLineArguments.test_startup_timeout. r=ato
Using a startup timeout of 0s should always cause an IOError, even for builds which startup within 100ms (pgo, Nightly opt). Further the test should not modify the internal startup timeout property, but pass the timeout as parameter to "start_session()". Differential Revision: https://phabricator.services.mozilla.com/D10224 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
249491eb67
Коммит
5fcc1832bd
|
@ -37,16 +37,10 @@ class TestCommandLineArguments(MarionetteTestCase):
|
|||
self.assertTrue(safe_mode, "Safe Mode has not been enabled")
|
||||
|
||||
def test_startup_timeout(self):
|
||||
startup_timeout = self.marionette.startup_timeout
|
||||
|
||||
# Use a timeout which always cause an IOError
|
||||
self.marionette.startup_timeout = .1
|
||||
msg = "Process killed after {}s".format(self.marionette.startup_timeout)
|
||||
|
||||
try:
|
||||
self.marionette.quit()
|
||||
with self.assertRaisesRegexp(IOError, msg):
|
||||
self.marionette.start_session()
|
||||
with self.assertRaisesRegexp(IOError, "Process killed after 0s"):
|
||||
# Use a small enough timeout which should always cause an IOError
|
||||
self.marionette.start_session(timeout=0)
|
||||
finally:
|
||||
self.marionette.startup_timeout = startup_timeout
|
||||
self.marionette.start_session()
|
||||
|
|
Загрузка…
Ссылка в новой задаче