Closed Bug 2095778 Opened 7 days ago Closed 4 days ago

test_cachemiss.html fails when run twice in the same session because its gethash server completions are never cleared

Categories

(Toolkit :: Safe Browsing, task)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

toolkit/components/url-classifier/tests/mochitest/test_cachemiss.html stores full-hash completions in the shared state of cache.sjs in testPositiveCache, and nothing clears them. When the test runs a second time in the same harness session (the upcoming mochitest-plain-repeat jobs, --verify), the gethash server returns those completions to testNegativeCache. The resources that case expects to load get blocked, which fails "Should load bad javascript", "Should load bad css" and "Should import bad css". This is also why the test has a verify-standalone skip-if.

The fix adds the ?reset= handler that gethash.sjs already has to cache.sjs, and the test's reset() now clears the stored completions. It also removes the skip-if.

Blocks: 2095794

The completions added to cache.sjs by testPositiveCache persisted across runs, so on a second run testNegativeCache got them back from gethash and the resources it expects to load were blocked. The verify-standalone skip-if (bug 1995208) was for this.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/34c9962c0fee https://hg.mozilla.org/integration/autoland/rev/a744ebeaf28c Clear the completions test_cachemiss.html stored on its gethash server when it finishes, r=dimi.
Status: ASSIGNED → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: