Bug 1375637 - Make test_async_script_timeout less likely to fail. r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@sny.no>
Wed, 07 Feb 2018 18:15:20 +0000
changeset 761640 8306ccb1dd271181c80e9eba2129e4d563f5f204
parent 761639 a377dbc4074c8e48c133b2c322db19ec00a71dbe
child 761641 3e0c6008d60d98257ffcf492fc3f0a29a12c0a4f
push id100982
push userstransky@redhat.com
push dateThu, 01 Mar 2018 09:41:46 +0000
reviewersautomatedtester, test-only
bugs1375637
milestone59.0
Bug 1375637 - Make test_async_script_timeout less likely to fail. r=automatedtester, a=test-only 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