Closed Bug 1340776 Opened 8 years ago Closed 7 years ago

Intermittent test_switch_window_chrome.py TestSwitchWindowChrome.test_switch_tabs_for_new_foreground_window_with_focus_change | AssertionError: 1 == 1

Categories

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

Version 3
All
Windows 10
defect

Tracking

(firefox61 wontfix, firefox64 wontfix, firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox61 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

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

References

Details

(Keywords: bulk-close-intermittents, intermittent-failure)

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → VERIFIED
OS: Unspecified → Windows 10
Hardware: Unspecified → All
Here the code which fails: https://dxr.mozilla.org/mozilla-central/rev/b906009d875d1f5d29b0d1252cdb43a9b1a5889c/testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_chrome.py#80-84 > self.assertNotEqual(self.get_selected_tab_index(), second_tab_index) > AssertionError: 1 == 1 The screenshot as part of the report.html file is misleading because it captures the first window, but not the newly created one because the context hasn't been switched yet. Given that we check the tab index, I can only assume that `get_selected_tab_index()` is racy and actually still uses the previously open window and not the newly opened one as most recent window: https://dxr.mozilla.org/mozilla-central/rev/b906009d875d1f5d29b0d1252cdb43a9b1a5889c/testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_content.py#36-70 Maybe it is somewhat related to the same underlying problem as bug 1446293.
See Also: → 1446293
Priority: -- → P5
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → INCOMPLETE

(In reply to Henrik Skupin (:whimboo) from comment #22)

Given that we check the tab index, I can only assume that
get_selected_tab_index() is racy and actually still uses the previously
open window and not the newly opened one as most recent window:

We indeed had a race here, which got fixed by Gijs on bug 1506796. So this failure should indeed not happen anymore.

Assignee: nobody → gijskruitbosch+bugs
Depends on: 1506796
Resolution: INCOMPLETE → FIXED
Target Milestone: --- → mozilla65
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.