Closed Bug 1572220 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 18324 - [cookie-store] Deflake service worker registration

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 18324 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/18324
Details from upstream follow.

Robert Ma <robertma@chromium.org> wrote:

[cookie-store] Deflake service worker registration

Instead of attempting to unregister previously installed service workers
at the beginning of a test, use add_completion_callback to unregister
them at test completion. This will deflake the tests when they are run
multiple times without restarts (--rerun).

The alternative is to do what many tests in service-workers do:
unregister service workers at the start, but wait for newly installed
service workers to become activated and use registration.active
instead of registration.installing, which is a bit more complex.

Fixes the flakiness observed in #17866 .

PR 18324 applied with additional changes from upstream: 747ffaf83a7de8b914c08ae2132587acdbd70b26
Ran 5 tests and 80 subtests OK : 5 FAIL : 80
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/fd0a07a88d3f [wpt PR 18324] - [cookie-store] Deflake service worker registration, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Regressions: 1573065
Regressions: 1573076
You need to log in before you can comment on or make changes to this bug.