Closed Bug 1290806 Opened 3 years ago Closed 3 years ago

[e10s] Intermittent test_window_management.py TestSwitchWindow.test_windows | AssertionError: 1 != 2

Categories

(Testing :: Marionette, defect)

Version 3
defect
Not set

Tracking

(e10s+, firefox49 wontfix, firefox50 fixed, firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
e10s + ---
firefox49 --- wontfix
firefox50 --- fixed
firefox51 --- fixed

People

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

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Duplicate of this bug: 1290875
Orange Factor says that this failure is e10s only:

16:02:35    ERROR -  TEST-UNEXPECTED-FAIL | test_window_management.py TestSwitchWindow.test_windows | AssertionError: 1 != 2
16:02:35     INFO -  Traceback (most recent call last):
16:02:35     INFO -    File "/builds/slave/test/build/venv/lib/python2.7/site-packages/marionette/marionette_test.py", line 365, in run
16:02:35     INFO -      testMethod()
16:02:35     INFO -    File "/builds/slave/test/build/tests/marionette/tests/testing/marionette/harness/marionette/tests/unit/test_window_management.py", line 44, in test_windows
16:02:35     INFO -      self.assertEqual(len(now_available), len(orig_available) + 1)
16:02:35     INFO -  TEST-INFO took 1502ms

Looks also to be a race given that we do not wait for the new window to open.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
tracking-e10s: --- → ?
OS: Unspecified → All
Hardware: Unspecified → All
Summary: Intermittent test_window_management.py TestSwitchWindow.test_windows | AssertionError: 1 != 2 → [e10s] Intermittent test_window_management.py TestSwitchWindow.test_windows | AssertionError: 1 != 2
Attachment #8789442 - Flags: review?(ato) → review?(mjzffr)
Comment on attachment 8789442 [details]
Bug 1290806 - Fix TestSwitchWindow.test_windows by waiting for the newly opened window.

https://reviewboard.mozilla.org/r/77660/#review77176

r+wc

::: testing/marionette/harness/marionette/tests/unit/test_window_management.py:44
(Diff revision 1)
>          self.open_new_window()
>          #assert we're still in the original window
>          self.assertEqual(self.marionette.current_window_handle, orig_win)
>          now_available = self.marionette.window_handles
>          #assert we can find the new window
> -        self.assertEqual(len(now_available), len(orig_available) + 1)
> +        Wait(self.marionette).until(lambda _: len(now_available) == len(orig_available) + 1)

Add a `message` parameter to `until` -- otherwise the only failure info we'll get in the log will be "lambda"
Attachment #8789442 - Flags: review?(dburns)
Attachment #8789442 - Flags: review?(dburns)
Comment on attachment 8789442 [details]
Bug 1290806 - Fix TestSwitchWindow.test_windows by waiting for the newly opened window.

https://reviewboard.mozilla.org/r/77660/#review77212
Comment on attachment 8789442 [details]
Bug 1290806 - Fix TestSwitchWindow.test_windows by waiting for the newly opened window.

https://reviewboard.mozilla.org/r/77660/#review77262
Attachment #8789442 - Flags: review?(mjzffr) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f282dae81f23
Fix TestSwitchWindow.test_windows by waiting for the newly opened window. r=maja_zf
https://hg.mozilla.org/mozilla-central/rev/f282dae81f23
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Even branches earlier than aurora should be affected, but we are not going to fix those. Aurora will just be fine.
Whiteboard: [checkin-needed-aurora]
https://hg.mozilla.org/releases/mozilla-aurora/rev/6b9c6e4a0577
Flags: in-testsuite+
Whiteboard: [checkin-needed-aurora]
You need to log in before you can comment on or make changes to this bug.