summaryrefslogtreecommitdiffstats
path: root/services/sync/tests/unit/test_errorhandler_2.js
diff options
context:
space:
mode:
Diffstat (limited to 'services/sync/tests/unit/test_errorhandler_2.js')
-rw-r--r--services/sync/tests/unit/test_errorhandler_2.js77
1 files changed, 28 insertions, 49 deletions
diff --git a/services/sync/tests/unit/test_errorhandler_2.js b/services/sync/tests/unit/test_errorhandler_2.js
index 5cab4d832d..2a7e6ba619 100644
--- a/services/sync/tests/unit/test_errorhandler_2.js
+++ b/services/sync/tests/unit/test_errorhandler_2.js
@@ -74,13 +74,10 @@ add_task(async function test_crypto_keys_login_server_maintenance_error() {
Service.collectionKeys.clear();
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);
@@ -178,13 +175,10 @@ add_task(
await configureIdentity({ username: "broken.info" }, server);
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);
@@ -215,13 +209,10 @@ add_task(
await configureIdentity({ username: "broken.meta" }, server);
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);
@@ -254,13 +245,10 @@ add_task(
Service.collectionKeys.clear();
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);
@@ -291,13 +279,10 @@ add_task(
await configureIdentity({ username: "broken.keys" }, server);
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);
@@ -328,13 +313,10 @@ add_task(
await configureIdentity({ username: "broken.wipe" }, server);
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);
@@ -368,13 +350,10 @@ add_task(
engine.enabled = true;
let backoffInterval;
- Svc.Obs.add(
- "weave:service:backoff:interval",
- function observe(subject, data) {
- Svc.Obs.remove("weave:service:backoff:interval", observe);
- backoffInterval = subject;
- }
- );
+ Svc.Obs.add("weave:service:backoff:interval", function observe(subject) {
+ Svc.Obs.remove("weave:service:backoff:interval", observe);
+ backoffInterval = subject;
+ });
Assert.ok(!Status.enforceBackoff);
Assert.equal(Status.service, STATUS_OK);