Closed Bug 2095714 Opened 7 days ago Closed 4 days ago

test_import_with_cache.html fails when run twice in the same session because its sjs state persists

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

When dom/worklet/tests/test_import_with_cache.html runs a second time in the same session (as the upcoming mochitest-plain-repeat jobs do), every addModule() call rejects and it fails with "Import should load a resource."

server_import_with_cache.sjs serves the script once and answers 404 afterwards, tracking that with an unkeyed setState("alreadySent") that lasts for the whole job's web server. The second run's import therefore gets a 404.

The patch keys that state by a per-run query string, which also lets the test drop its verify-standalone skip.

Blocks: 2095794

server_import_with_cache.sjs answers 404 to every request after the first one, and its server state outlived the test, so a second run got 404 for all its imports. Key that state by a per-run query string, which also lets the test run under verify-standalone.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5ae91d01ac5d https://hg.mozilla.org/integration/autoland/rev/b9f976af4904 Make test_import_with_cache.html pass when run twice in the same session, r=dom-core-reviewers,smaug.
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/814f711dbdc6 https://hg.mozilla.org/integration/autoland/rev/4d5b753d3cbe Make test_import_with_cache.html pass when run twice in the same session, r=dom-core-reviewers,smaug.
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: