зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1573738 - Test aborting application, not only merging. a=testonly
`SyncedBookmarksMirror::merge` is racy: the storage thread might finish merging before it gets the cancellation signal. However, `apply` also notifies observers and fetches records, which happen after we've aborted our JS controller. Even if the Rust op isn't canceled in time, we should still abort the remaining operations. Differential Revision: https://phabricator.services.mozilla.com/D42065 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
80fa6900e1
Коммит
1e3d00af59
|
@ -11,8 +11,8 @@ add_task(async function test_abort_merging() {
|
|||
let controller = new AbortController();
|
||||
controller.abort();
|
||||
await Assert.rejects(
|
||||
buf.merge(controller.signal),
|
||||
/Operation aborted/,
|
||||
buf.apply({ signal: controller.signal }),
|
||||
ex => ex.name == "InterruptedError",
|
||||
"Should abort merge when signaled"
|
||||
);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче