From e73edabc8e184d186d77f014cc6f2d3c33f50046 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 10 Oct 2018 16:38:08 +0000 Subject: [PATCH] Bug 1497929 - Await the underlying promise r=chutten Previously, the test never waited for the notification to actually fire. Differential Revision: https://phabricator.services.mozilla.com/D8249 --HG-- extra : moz-landing-system : lando --- .../telemetry/tests/unit/test_TelemetryController_idle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js b/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js index d04709638130..a19d302910dc 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js @@ -49,7 +49,7 @@ add_task(async function testSendPendingOnIdleDaily() { // Check that we are correctly receiving the gather-telemetry notification. TelemetrySession.observe(null, "idle-daily", null); - await gatherPromise; + await gatherPromise.promise; Assert.ok(true, "Received gather-telemetry notification."); Services.obs.removeObserver(gatherPromise.resolve, "gather-telemetry");