Closed Bug 1474091 Opened 2 years ago Closed 1 year ago

TEST-UNEXPECTED-FAIL | [snip]/message-header/test-message-header.js | test-message-header.js::test_a11y_attrs

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect
Not set

Tracking

(thunderbird63 fixed, thunderbird64 fixed)

RESOLVED FIXED
Thunderbird 64.0
Tracking Status
thunderbird63 --- fixed
thunderbird64 --- fixed

People

(Reporter: jorgk-bmo, Assigned: aceman)

Details

(Keywords: intermittent-failure, Whiteboard: [Thunderbird-testfailure: Z Mac+Linux])

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #1298339 +++

This is happening more and more now but not always:
TEST-UNEXPECTED-FAIL | /Users/cltbld/tasks/task_1530962987/build/tests/mozmill/message-header/test-message-header.js | test-message-header.js::test_a11y_attrs

Fri, Jul 6, 2018, 02:19:12
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=a2edf68a0bf2caf2b024c66ab5af74d0d7b9e115&selectedJob=186803432

Sat, Jul 7, 2018, 12:58:41
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=a75878fe1f574a55f9e03ac27027f11e5fa336e3&selectedJob=186983717

https://taskcluster-artifacts.net/f_ttHcaFQPqDxFwuPGP7qQ/0/public/logs/live_backing.log says:
INFO -  SUMMARY-UNEXPECTED-FAIL | test-message-header.js | test-message-header.js::test_a11y_attrs
INFO -    EXCEPTION: headerAccessible is null
INFO -      at: test-message-header.js line 259
INFO -         verify_header_a11y test-message-header.js:259 1
INFO -         test_a11y_attrs test-message-header.js:302 3

Aceman, could you please have a look.
Flags: needinfo?(acelists)
Geoff, next time you feel like fixing a test failure with one line, this is now the top failing test.

Recent log:
https://taskcluster-artifacts.net/GQnFENnGQ5-37fuJaNVCSQ/0/public/logs/live_backing.log

INFO -  SUMMARY-UNEXPECTED-FAIL | test-message-header.js | test-message-header.js::test_a11y_attrs
INFO -    EXCEPTION: headerAccessible is null, can't access property "role" of it
INFO -      at: test-message-header.js line 259
INFO -         verify_header_a11y test-message-header.js:259 3
INFO -         test_a11y_attrs test-message-header.js:302 3
Flags: needinfo?(geoff)
Attached patch WIP (obsolete) — Splinter Review
Here is my current WIP patch about what I have tried.
Assignee: nobody → acelists
Flags: needinfo?(acelists)
Attached patch 1474091.patch (obsolete) — Splinter Review
Thanks, at least it does not hurt so let's try to land it and see if it fixes the problem permanently.

The main fix is the added
mc.waitFor(() => (headerAccessible = gAccService.getAccessibleFor(headerValueElement))

The rest is cleanup and removal of "eval".
Attachment #9007884 - Attachment is obsolete: true
Attachment #9008181 - Flags: review?(jorgk)
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → Trunk
Comment on attachment 9008181 [details] [diff] [review]
1474091.patch

Review of attachment 9008181 [details] [diff] [review]:
-----------------------------------------------------------------

Wow, to of the most notorious tests fixed within 48 hours. Is there a competition going on? If so, consider: https://mzl.la/2gS72WO

::: mail/test/mozmill/message-header/test-message-header.js
@@ +270,5 @@
> +                    "element not found for header " + aHeaderInfo.headerName);
> +
> +  let headerAccessible;
> +  mc.waitFor(() => (headerAccessible = gAccService.getAccessibleFor(headerValueElement)) != null,
> +    "didn't find accessible element for header '" + aHeaderInfo.headerName + "'");

This and the two below could be more legible using template literals, the stuff using backticks:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

@@ +275,5 @@
>  
> +  assert_equals(headerAccessible.role, aHeaderInfo.expectedRole,
> +    "role for " + aHeaderInfo.headerName + " was " +
> +    headerAccessible.role + "; should have been " +
> +    aHeaderInfo.expectedRole);

`role for ${aHeaderInfo.headerName} was ${headerAccessible.role}; should have been 
${aHeaderInfo.expectedRole}`

@@ +281,5 @@
> +  let expectedName = aHeaderInfo.expectedName(mc, headerValueElement);
> +  assert_equals(headerAccessible.name, expectedName,
> +    "headerAccessible.name for " + aHeaderInfo.headerName +
> +    " was '" + headerAccessible.name + "'; expected '" +
> +    expectedName + "'");

and here.
Attachment #9008181 - Flags: review?(jorgk) → review+
Thanks
Attachment #9008181 - Attachment is obsolete: true
Attachment #9008210 - Flags: review+
Keywords: checkin-needed
Attachment #9008210 - Flags: approval-comm-beta+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/a4f58095ed04
fix test-message-header.js by waiting for accessible element for message header to appear. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 64.0
You need to log in before you can comment on or make changes to this bug.