Closed Bug 2091370 Opened 15 days ago Closed 13 days ago

browser_custom_avatar_test.js fails when run twice in the same browser: "Should have recorded the profiles error avatar event exactly once - 2 == 1"

Categories

(Toolkit :: Startup and Profile System, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

Details

Attachments

(1 external file)

test_missing_custom_avatar_falls_back_to_default in browser_custom_avatar_test.js checks that exactly one profiles.error.avatar Glean event was recorded, but it doesn't reset FOG first. When the test runs a second time in the same browser (as the upcoming mochitest-browser-chrome-repeat jobs do), the event from the first run is still stored and the assertion sees 2.

The fix calls Services.fog.testResetFOG() at the start of the task, as other tests in this directory already do.

The profiles.error.avatar Glean event recorded by the first run was still there when the test ran again in the same browser (with --repeat, or in the upcoming mochitest-browser-chrome-repeat jobs).

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a3dbd5ac57ac https://hg.mozilla.org/integration/autoland/rev/96326b7052e7 Reset FOG before checking the missing avatar error event in browser_custom_avatar_test.js, r=niklas.
Status: ASSIGNED → RESOLVED
Closed: 13 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: