Bug 1416902 - Fix missing await in test_service_sync_updateEnabledEngines and test_interval_triggers r=kitcambridge
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Mon, 13 Nov 2017 16:53:15 -0500
changeset 443524 9f310ebf0488fce55e5618a31497c8b1460699c7
parent 443523 e2e96cb6d4807899cb918ba69227d3ae1e141ac2
child 443525 e077a6e6e8425ca49a7992e3ee0a589ebe050184
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskitcambridge
bugs1416902
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1416902 - Fix missing await in test_service_sync_updateEnabledEngines and test_interval_triggers r=kitcambridge MozReview-Commit-ID: 6rFOWPsxxxj
services/sync/tests/unit/test_interval_triggers.js
services/sync/tests/unit/test_service_sync_updateEnabledEngines.js
--- a/services/sync/tests/unit/test_interval_triggers.js
+++ b/services/sync/tests/unit/test_interval_triggers.js
@@ -36,17 +36,17 @@ function sync_httpd_setup() {
   });
 }
 
 async function setUp(server) {
   await configureIdentity({username: "johndoe"}, server);
   await generateNewKeys(Service.collectionKeys);
   let serverKeys = Service.collectionKeys.asWBO("crypto", "keys");
   await serverKeys.encrypt(Service.identity.syncKeyBundle);
-  serverKeys.upload(Service.resource(Service.cryptoKeysURL));
+  await serverKeys.upload(Service.resource(Service.cryptoKeysURL));
 }
 
 add_task(async function setup() {
   initTestLogging("Trace");
 
   Log.repository.getLogger("Sync.Service").level = Log.Level.Trace;
   Log.repository.getLogger("Sync.SyncScheduler").level = Log.Level.Trace;
 
--- a/services/sync/tests/unit/test_service_sync_updateEnabledEngines.js
+++ b/services/sync/tests/unit/test_service_sync_updateEnabledEngines.js
@@ -65,17 +65,18 @@ function sync_httpd_setup(handlers) {
 
 async function setUp(server) {
   await SyncTestingInfrastructure(server, "johndoe", "ilovejane");
   // Ensure that the server has valid keys so that logging in will work and not
   // result in a server wipe, rendering many of these tests useless.
   await generateNewKeys(Service.collectionKeys);
   let serverKeys = Service.collectionKeys.asWBO("crypto", "keys");
   await serverKeys.encrypt(Service.identity.syncKeyBundle);
-  return serverKeys.upload(Service.resource(Service.cryptoKeysURL)).success;
+  let {success} = await serverKeys.upload(Service.resource(Service.cryptoKeysURL));
+  ok(success);
 }
 
 const PAYLOAD = 42;
 
 add_task(async function setup() {
   initTestLogging();
   Service.engineManager.clear();