Bug 1781451 - Add a missing await in the test r=asuth

PushService.init is an async function waiting on a queue, thus it should be awaited to make sure the mock service registers before `PushService.unregister`.

Differential Revision: https://phabricator.services.mozilla.com/D247795
This commit is contained in:
Kagami Sascha Rosylight
2025-05-06 15:06:12 +00:00
committed by krosylight@mozilla.com
parent 8f64cfffc3
commit 1ea0c18bff
2 changed files with 1 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ add_task(async function test_unregister_invalid_json() {
let unregisterPromise = new Promise( let unregisterPromise = new Promise(
resolve => (unregisterDone = after(2, resolve)) resolve => (unregisterDone = after(2, resolve))
); );
PushService.init({ await PushService.init({
serverURI: "wss://push.example.org/", serverURI: "wss://push.example.org/",
db, db,
makeWebSocket(uri) { makeWebSocket(uri) {

View File

@@ -96,10 +96,6 @@ run-sequentially = "This will delete all existing push subscriptions."
["test_unregister_error.js"] ["test_unregister_error.js"]
["test_unregister_invalid_json.js"] ["test_unregister_invalid_json.js"]
run-sequentially = "very high failure rate in parallel"
skip-if = [
"os == 'linux' && os_version == '18.04' && processor == 'x86_64' && tsan", # Bug 1933914
]
["test_unregister_not_found.js"] ["test_unregister_not_found.js"]