Closed Bug 2084265 Opened 1 month ago Closed 1 month ago

Intermittent browser_search_lastused_pref.js | The urlbar search was recorded - N > N

Categories

(Firefox :: Search, task)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

browser_search_lastused_pref.js checks that browser.urlbar.lastUrlbarSearchSeconds increases after a urlbar search. The pref has one-second resolution (Math.round(Date.now() / 1000) in BrowserSearchTelemetry.recordSearch). The previous test in the manifest, browser_searchRestrictToken_privateWindow.js, also does a urlbar search. When that search happened less than a second earlier, the value does not change and the assertion fails. This is around 95 failures/week, all on the uipc variants.

The fix is to clear the pref in the test's add_setup so that it starts from the default 0.

Test dashboard: https://tests.firefox.dev/test.html?test=browser/components/search/test/browser/browser_search_lastused_pref.js

Blocks: 2084272

The pref has one-second resolution, so when the previous test did a urlbar search less than a second earlier, the new value equals the old one.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9c1f91085d40 https://hg.mozilla.org/integration/autoland/rev/25bb5d49cc97 Reset browser.urlbar.lastUrlbarSearchSeconds before testing it is updated, r=search-reviewers,scunnane.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [search][qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: