Closed Bug 1212811 Opened 9 years ago Closed 9 years ago

TEST-UNEXPECTED-FAIL | test_windows.py TestBaseWindow.test_switch_to_and_focus | AssertionError: False is not true

Categories

(Testing :: Firefox UI Tests, defect)

Version 3
All
Linux
defect
Not set
normal

Tracking

(firefox41 wontfix, firefox42 wontfix, firefox43 wontfix, firefox44 wontfix, firefox45 wontfix, firefox46 fixed, firefox47 fixed, firefox48 fixed, firefox-esr45 affected)

RESOLVED FIXED
mozilla48
Tracking Status
firefox41 --- wontfix
firefox42 --- wontfix
firefox43 --- wontfix
firefox44 --- wontfix
firefox45 --- wontfix
firefox46 --- fixed
firefox47 --- fixed
firefox48 --- fixed
firefox-esr45 --- affected

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Traceback (most recent call last): File "/home/mozauto/jenkins/workspace/mozilla-central_functional/venv/local/lib/python2.7/site-packages/marionette/marionette_test.py", line 296, in run testMethod() File "/home/mozauto/jenkins/workspace/mozilla-central_functional/venv/lib/python2.7/site-packages/firefox_puppeteer/tests/test_windows.py", line 153, in test_switch_to_and_focus self.assertTrue(win2.focused) AssertionError: False is not true
OS: Unspecified → Linux
Hardware: Unspecified → All
Blocks: 1214378
We had a couple of those reports for the latest beta tests. I have checked the affected Linux machines and each of those had a crash report dialog open for the Keyboard input methods application: /usr/bin/ibus-daemon. I retriggered the builds but looks like nearly all of them are still failing. So that dialog is not the reason.
See Also: → 1234175
Product: Mozilla QA → Testing
Ok, so the problem here could be in the `focused_chrome_window_handle()` method: https://dxr.mozilla.org/mozilla-central/source/testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py#42 In some cases - I assume on slower or highly utilized machines - the focus is not set immediately to the new window. Instead it takes a moment and exactly when performing the focus change no window has the focus. The above mentioned method would return `null` then. As result the failure in the BaseWindow test would happen. Maybe the best option here would be to safe-guard `focused_chrome_window_handle()` and only return if a valid handle has been found or a timeout happens.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Ok, I was able to reproduce this problem on an affected Linux machine: ** Focusing of handle: 3 ** focused_chrome_window_handle: None ** focused_chrome_window_handle: 15 We should indeed safe-guard the `focused_chrome_window_handle()` method.
Comment on attachment 8727357 [details] MozReview Request: Bug 1212811 - focused_chrome_window_handle() should wait until focus transition has been finished. r=maja_zf Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38455/diff/1-2/
Comment on attachment 8727357 [details] MozReview Request: Bug 1212811 - focused_chrome_window_handle() should wait until focus transition has been finished. r=maja_zf Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38455/diff/2-3/
Comment on attachment 8727357 [details] MozReview Request: Bug 1212811 - focused_chrome_window_handle() should wait until focus transition has been finished. r=maja_zf https://reviewboard.mozilla.org/r/38455/#review35071 r+wc -- I have a small doubt, but otherwise this looks good. ::: testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py:64 (Diff revision 3) > + return Wait(self.marionette).until(get_active_handle, Can `get_active_handle` ever legitimately return 0? In that case, wouldn't `until` fail due to 0 being falsey?
Attachment #8727357 - Flags: review?(mjzffr) → review+
(In reply to Maja Frydrychowicz (:maja_zf) from comment #13) > Can `get_active_handle` ever legitimately return 0? In that case, wouldn't > `until` fail due to 0 being falsey? No, we do not have outer window ids of 0. The first visible chrome window which is the browser window has the id 3.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
No test failure for this particular issue anymore the last days. Please get this patch landed on aurora and beta. It's a test-only change. Thanks.
Whiteboard: [checkin-needed-aurora][checkin-needed-beta]
Whiteboard: [checkin-needed-aurora][checkin-needed-beta] → [checkin-needed-beta]
Whiteboard: [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: