Closed Bug 1303497 Opened 3 years ago Closed 3 years ago

Intermittent test_window_management.py TestSwitchWindow.test_windows | TimeoutException: Timed out after 5.1 seconds with message: The new window has not been opened.

Categories

(Testing :: Marionette, defect)

Version 3
defect
Not set

Tracking

(firefox50 fixed, firefox51 fixed, firefox52 fixed)

RESOLVED FIXED
mozilla52
Tracking Status
firefox50 --- fixed
firefox51 --- fixed
firefox52 --- fixed

People

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

Details

(Keywords: intermittent-failure, Whiteboard: [e10s-multi:?])

Attachments

(1 file)

17:44:40    ERROR -  TEST-UNEXPECTED-ERROR | test_window_management.py TestSwitchWindow.test_windows | TimeoutException: Timed out after 5.1 seconds with message: The new window has not been opened.
17:44:40     INFO -  Traceback (most recent call last):
17:44:40     INFO -    File "/builds/slave/test/build/venv/lib/python2.7/site-packages/marionette/marionette_test/testcases.py", line 162, in run
17:44:40     INFO -      testMethod()
17:44:40     INFO -    File "/builds/slave/test/build/tests/marionette/tests/testing/marionette/harness/marionette/tests/unit/test_window_management.py", line 46, in test_windows
17:44:40     INFO -      message="The new window has not been opened.")
17:44:40     INFO -    File "/builds/slave/test/build/venv/lib/python2.7/site-packages/marionette_driver/wait.py", line 151, in until
17:44:40     INFO -      cause=last_exc)

https://dxr.mozilla.org/mozilla-central/rev/f0f15b7c6aa77a0c5750918aa0a1cb3dc82185bc/testing/marionette/harness/marionette/tests/unit/test_window_management.py#42

Ups, we only get the now available window handles before the call to Wait().until(). It means that we never recognize if the window opens lazely.
With e10s-multi this becomes perma orange... Could you give me some advice how to fix this? (I'm not familiar with these python based tests)
Flags: needinfo?(hskupin)
Whiteboard: [e10s-multi:?]
I can quickly patch that and hope it will fix the e10s-multi case too.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Flags: needinfo?(hskupin)
Comment on attachment 8793746 [details]
Bug 1303497 - Fix failure in test_window_management.py for new window checks.

https://reviewboard.mozilla.org/r/80424/#review79098

Your changes look good, but I noticed another problem with window switching just below.

::: testing/marionette/harness/marionette/tests/unit/test_window_management.py:53
(Diff revision 1)
> -        #switch to another window
> +        # switch to another window
>          self.marionette.switch_to_window(new_win)

new_win == orig_win, so you don't actually switch to another window.
Attachment #8793746 - Flags: review?(mjzffr) → review-
Comment on attachment 8793746 [details]
Bug 1303497 - Fix failure in test_window_management.py for new window checks.

https://reviewboard.mozilla.org/r/80424/#review79098

I fixed that and added some more checks to ensure we do the correct things in this very basic window test. More refactoring will come with bug 1259055.
Comment on attachment 8793746 [details]
Bug 1303497 - Fix failure in test_window_management.py for new window checks.

https://reviewboard.mozilla.org/r/80424/#review79112
Attachment #8793746 - Flags: review?(mjzffr) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/70c6f01a830b
Fix failure in test_window_management.py for new window checks. r=maja_zf
https://hg.mozilla.org/mozilla-central/rev/70c6f01a830b
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Looks like we have no regressions on autoland and mozilla-central. So lets get it uplifted to fix the failures on aurora and beta.
Whiteboard: [e10s-multi:?] → [e10s-multi:?][checkin-needed-aurora][checkin-needed-beta]
https://hg.mozilla.org/releases/mozilla-aurora/rev/b57b64179109
Flags: in-testsuite+
Whiteboard: [e10s-multi:?][checkin-needed-aurora][checkin-needed-beta] → [e10s-multi:?][checkin-needed-beta]
https://hg.mozilla.org/releases/mozilla-beta/rev/30c48aa0402d
Whiteboard: [e10s-multi:?][checkin-needed-beta] → [e10s-multi:?]
You need to log in before you can comment on or make changes to this bug.