Closed Bug 1375637 Opened 7 years ago Closed 7 years ago

Intermittent test_execute_script.py TestExecuteChrome.test_async_script_timeout | AssertionError: ScriptTimeoutException not raised

Categories

(Testing :: Marionette Client and Harness, defect, P5)

All
Windows
defect

Tracking

(firefox56 wontfix, firefox57 wontfix, firefox58 wontfix, firefox59 fixed, firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- wontfix
firefox59 --- fixed
firefox60 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: ato)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Component: Headless → Marionette
Product: Firefox → Testing
Last failure was non-headless.
22:07:12 INFO - 1499465232714 Marionette TRACE 554 -> [0,11,"executeAsyncScript",{"scriptTimeout":100,"sandbox":"default","debug_script":false,"script":"\n var cb = arguments[arguments.length - 1];\n setTimeout(function() { cb() }, 250);\n ","newSandbox":true,"line":401,"args":[],"filename":"test_execute_script.py"}] 22:07:13 INFO - 1499465233063 Marionette TRACE 554 <- [1,11,null,{"value":null}] Interestingly the execution of the command takes around 350ms, so the timeout was never taken into account here, or the timer got delayed due to a system slowdown maybe? Even not sure what `cb` actually is in this case because we don't pass any arguments into the call to `execute_async_script`, and in JS we access it via `arguments[arguments.length - 1]`. So after 250ms we try to call `undefined`? What stops us from even using a higher timeout value than 250 here?
Flags: needinfo?(ato)
OS: Unspecified → Windows
Hardware: Unspecified → All
(In reply to Henrik Skupin (:whimboo) [away 07/21 - 07/31] from comment #5) > Even not sure what `cb` actually is in this case because we don't > pass any arguments into the call to `execute_async_script`, and in > JS we access it via `arguments[arguments.length - 1]`. So after > 250ms we try to call `undefined`? What stops us from even using a > higher timeout value than 250 here? The last argument to the WebDriver:ExecuteAsyncScript command (as it is now known) is always the callback to stop script evaluation and return control to the user. When arguments[arguments.length - 1] (or cb) is called after 250, the script returns. This script is supposed to cause a timeout error because the scriptTimeout parameter is 100 ms.
Flags: needinfo?(ato)
Assignee: nobody → ato
Priority: -- → P5
Comment on attachment 8949106 [details] Bug 1375637 - Make test_async_script_timeout less likely to fail. https://reviewboard.mozilla.org/r/218504/#review225144
Attachment #8949106 - Flags: review?(dburns) → review+
Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9bc3906d3dc9 Make test_async_script_timeout less likely to fail. r=automatedtester
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Product: Testing → Remote Protocol
Moving bug to Testing::Marionette Client and Harness component per bug 1815831.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: