diff options
author | wicknix <39230578+wicknix@users.noreply.github.com> | 2019-04-15 18:58:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 18:58:07 -0500 |
commit | 5a1843c9f9e323627f9c35529e6a8c853d4dbb0d (patch) | |
tree | 62de3cd7cb8a6f75e568863bb73ca2deb80d87a9 /services/sync/tests/unit/test_interval_triggers.js | |
parent | 065f6f9e5ebc1ed6cfaadaf7851b6021fa94a013 (diff) | |
parent | 095ea556855b38138e39e713f482eb440f7da9b2 (diff) | |
download | UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar.gz UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar.lz UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar.xz UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.zip |
Merge pull request #1 from MoonchildProductions/master
keep up with mc
Diffstat (limited to 'services/sync/tests/unit/test_interval_triggers.js')
-rw-r--r-- | services/sync/tests/unit/test_interval_triggers.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/services/sync/tests/unit/test_interval_triggers.js b/services/sync/tests/unit/test_interval_triggers.js index eca5ec289..0f355e636 100644 --- a/services/sync/tests/unit/test_interval_triggers.js +++ b/services/sync/tests/unit/test_interval_triggers.js @@ -10,13 +10,8 @@ Cu.import("resource://testing-common/services/sync/utils.js"); Svc.DefaultPrefs.set("registerEngines", ""); Cu.import("resource://services-sync/service.js"); -var scheduler = Service.scheduler; -var clientsEngine = Service.clientsEngine; - -// Don't remove stale clients when syncing. This is a test-only workaround -// that lets us add clients directly to the store, without losing them on -// the next sync. -clientsEngine._removeRemoteClient = id => {}; +let scheduler = Service.scheduler; +let clientsEngine = Service.clientsEngine; function promiseStopServer(server) { let deferred = Promise.defer(); @@ -46,7 +41,7 @@ function sync_httpd_setup() { }); } -function* setUp(server) { +function setUp(server) { yield configureIdentity({username: "johndoe"}); Service.serverURL = server.baseURI + "/"; Service.clusterURL = server.baseURI + "/"; @@ -65,7 +60,7 @@ function run_test() { run_next_test(); } -add_identity_test(this, function* test_successful_sync_adjustSyncInterval() { +add_identity_test(this, function test_successful_sync_adjustSyncInterval() { _("Test successful sync calling adjustSyncInterval"); let syncSuccesses = 0; function onSyncFinish() { @@ -164,7 +159,7 @@ add_identity_test(this, function* test_successful_sync_adjustSyncInterval() { yield promiseStopServer(server); }); -add_identity_test(this, function* test_unsuccessful_sync_adjustSyncInterval() { +add_identity_test(this, function test_unsuccessful_sync_adjustSyncInterval() { _("Test unsuccessful sync calling adjustSyncInterval"); let syncFailures = 0; @@ -269,7 +264,7 @@ add_identity_test(this, function* test_unsuccessful_sync_adjustSyncInterval() { yield promiseStopServer(server); }); -add_identity_test(this, function* test_back_triggers_sync() { +add_identity_test(this, function test_back_triggers_sync() { let server = sync_httpd_setup(); yield setUp(server); @@ -301,7 +296,7 @@ add_identity_test(this, function* test_back_triggers_sync() { yield deferred.promise; }); -add_identity_test(this, function* test_adjust_interval_on_sync_error() { +add_identity_test(this, function test_adjust_interval_on_sync_error() { let server = sync_httpd_setup(); yield setUp(server); @@ -332,7 +327,7 @@ add_identity_test(this, function* test_adjust_interval_on_sync_error() { yield promiseStopServer(server); }); -add_identity_test(this, function* test_bug671378_scenario() { +add_identity_test(this, function test_bug671378_scenario() { // Test scenario similar to bug 671378. This bug appeared when a score // update occurred that wasn't large enough to trigger a sync so // scheduleNextSync() was called without a time interval parameter, |