Closed Bug 1753718 Opened 2 years ago Closed 2 years ago

Add test(s) ensuring that a running background task does not prevent application updates

Categories

(Toolkit :: Background Tasks, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(4 files)

The initial landing of pingsender as a background task was reverted because it interfered with updates. pingsender is invoked at Firefox shutdown time, and we believe that what was happening is that when Firefox restarted to process updates, the pingsender background task process raced Firefox to apply the pending updates, with poor results. Bug 1737117 changed the background task and update interaction so that updates are processed only for backgroundupdate tasks, so this particular race window should now be closed. But we still want to be confident that (potentially long-lived) background tasks sparked at Firefox shutdown time don't impact immediate restarts to apply updates. This ticket tracks adding test(s) asserting as much.

Severity: -- → N/A

Right now, the application can be launched after setup, but only for
very minimal functionality: that used to test the updater callback.
To test updating while background tasks are running, we need the
omnijars that contain the task definition JavaScript. Since copying
large omnijars is expensive (at least on Windows), this is optional.
Using objects and defaults is not in keeping with the existing style
but adding yet another boolean argument is not sustainable.

While in the area, also print file permissions in octal.

We may get multiple lines or incomplete lines from the pipe, so we
need to split the data and keep the leftover. This makes debugging a
little more pleasant and allows for the consumer to react to stdout as
it is read.

Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e91cb4be562e
Pre: Optionally copy omnijars during update unit tests. r=application-update-reviewers,bytesized
https://hg.mozilla.org/integration/autoland/rev/0f3d9fa6bec8
Pre: Prefix child process stdout lines with PID>; add stdout line callback. r=bytesized
https://hg.mozilla.org/integration/autoland/rev/8d904f0efbcb
Add test(s) ensuring that a running background task does not prevent application updates. r=application-update-reviewers,bytesized
https://hg.mozilla.org/integration/autoland/rev/0ce7bb7d6678
Post: Docs for shutdown background tasks process lifetimes. r=application-update-reviewers,bytesized
Component: Application Update → Background Tasks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: