mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Backed out changeset 7aa8180f36eb (bug 1563180) for ESlint failure
This commit is contained in:
parent
4039e268d2
commit
6e3840ddec
@ -193,7 +193,6 @@ class RemoteSettingsClient extends EventEmitter {
|
||||
this.localFields = localFields;
|
||||
this._lastCheckTimePref = lastCheckTimePref;
|
||||
this._verifier = null;
|
||||
this._syncRunning = false;
|
||||
|
||||
// This attribute allows signature verification to be disabled, when running tests
|
||||
// or when pulling data from a dev server.
|
||||
@ -363,14 +362,6 @@ class RemoteSettingsClient extends EventEmitter {
|
||||
async maybeSync(expectedTimestamp, options = {}) {
|
||||
const { loadDump = true, trigger = "manual" } = options;
|
||||
|
||||
// Make sure we don't run several synchronizations in parallel, mainly
|
||||
// in order to avoid race conditions in "sync" events listeners.
|
||||
if (this._syncRunning) {
|
||||
console.warn(`${this.identifier} sync already running`);
|
||||
return;
|
||||
}
|
||||
this._syncRunning = true;
|
||||
|
||||
let importedFromDump = [];
|
||||
const startedAt = new Date();
|
||||
let reportStatus = null;
|
||||
@ -597,7 +588,6 @@ class RemoteSettingsClient extends EventEmitter {
|
||||
duration: durationMilliseconds,
|
||||
});
|
||||
console.debug(`${this.identifier} sync status is ${reportStatus}`);
|
||||
this._syncRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,20 +351,6 @@ add_task(async function test_get_does_not_verify_signature_if_load_dump() {
|
||||
});
|
||||
add_task(clear_state);
|
||||
|
||||
add_task(async function test_sync_runs_once_only() {
|
||||
const backup = Utils.log.warn;
|
||||
const messages = [];
|
||||
Utils.log.warn = (m) => {
|
||||
messages.push(m);
|
||||
};
|
||||
|
||||
await Promise.all([client.maybeSync(2000), client.maybeSync(2000)]);
|
||||
|
||||
ok(messages.includes("main/password-fields sync already running"), "warning is shown about sync already running");
|
||||
Utils.log.warn = backup;
|
||||
});
|
||||
add_task(clear_state);
|
||||
|
||||
add_task(
|
||||
async function test_sync_pulls_metadata_if_missing_with_dump_is_up_to_date() {
|
||||
if (IS_ANDROID) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user