diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-10-06 06:57:51 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-10-06 06:57:51 +0200 |
commit | 0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (patch) | |
tree | c321601f04cbfd02fb6e12878e745dc49a612c86 /services/sync/tests/unit/test_hmac_error.js | |
parent | 8860eddcee1417483cafd114f3a9ec127e0f1f74 (diff) | |
download | UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.gz UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.lz UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.xz UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.zip |
Import Tycho weave client
Diffstat (limited to 'services/sync/tests/unit/test_hmac_error.js')
-rw-r--r-- | services/sync/tests/unit/test_hmac_error.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/services/sync/tests/unit/test_hmac_error.js b/services/sync/tests/unit/test_hmac_error.js index 272c0de47..e41ff3797 100644 --- a/services/sync/tests/unit/test_hmac_error.js +++ b/services/sync/tests/unit/test_hmac_error.js @@ -8,7 +8,7 @@ Cu.import("resource://testing-common/services/sync/rotaryengine.js"); Cu.import("resource://testing-common/services/sync/utils.js"); // Track HMAC error counts. -var hmacErrorCount = 0; +let hmacErrorCount = 0; (function () { let hHE = Service.handleHMACEvent; Service.handleHMACEvent = function () { @@ -49,7 +49,7 @@ function shared_setup() { return [engine, rotaryColl, clientsColl, keysWBO, global]; } -add_task(function *hmac_error_during_404() { +add_test(function hmac_error_during_404() { _("Attempt to replicate the HMAC error setup."); let [engine, rotaryColl, clientsColl, keysWBO, global] = shared_setup(); @@ -83,14 +83,13 @@ add_task(function *hmac_error_during_404() { try { _("Syncing."); - yield sync_and_validate_telem(); - + Service.sync(); _("Partially resetting client, as if after a restart, and forcing redownload."); Service.collectionKeys.clear(); engine.lastSync = 0; // So that we redownload records. key404Counter = 1; _("---------------------------"); - yield sync_and_validate_telem(); + Service.sync(); _("---------------------------"); // Two rotary items, one client record... no errors. @@ -98,7 +97,7 @@ add_task(function *hmac_error_during_404() { } finally { Svc.Prefs.resetBranch(""); Service.recordManager.clearCache(); - yield new Promise(resolve => server.stop(resolve)); + server.stop(run_next_test); } }); |