Bug 1375637 - Make test_async_script_timeout less likely to fail. r?automatedtester draft
authorAndreas Tolfsen <ato@sny.no>
Wed, 07 Feb 2018 18:15:20 +0000
changeset 752192 526b12ec842a802d5fb18b3e3ea6c2e85296de94
parent 752153 65133e49fbfd5306632301f74be7cd15890bdf9f
push id98194
push userbmo:ato@sny.no
push dateWed, 07 Feb 2018 18:18:10 +0000
reviewersautomatedtester
bugs1375637
milestone60.0a1
Bug 1375637 - Make test_async_script_timeout less likely to fail. r?automatedtester By increasing the duration before setTimeout fires the callback and the execute_async_script call returns control to the user we are less likely that there is a race condition between the relatively short 100 ms interruption time. MozReview-Commit-ID: BVKRiU7a2gK
testing/marionette/harness/marionette_harness/tests/unit/test_execute_script.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_execute_script.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_execute_script.py
@@ -390,17 +390,17 @@ class TestExecuteChrome(WindowManagerMix
 
         finally:
             self.close_all_windows()
 
     def test_async_script_timeout(self):
         with self.assertRaises(errors.ScriptTimeoutException):
             self.marionette.execute_async_script("""
                 var cb = arguments[arguments.length - 1];
-                setTimeout(function() { cb() }, 250);
+                setTimeout(function() { cb() }, 2500);
                 """, script_timeout=100)
 
     def test_lasting_side_effects(self):
         pass
 
     def test_return_web_element(self):
         pass