From 48741100a5458534f428e9301804426aa4ab62fe Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 16 Jan 2020 17:06:30 -0500 Subject: [PATCH] Don't try to pull retractions list from server at startup during tests This causes problems with filtered test runs, since the request is cancelled and the long response gets dumped to the console, making the test result hard to find. --- chrome/content/zotero/xpcom/retractions.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/retractions.js b/chrome/content/zotero/xpcom/retractions.js index 168f538301..33d532464b 100644 --- a/chrome/content/zotero/xpcom/retractions.js +++ b/chrome/content/zotero/xpcom/retractions.js @@ -90,7 +90,13 @@ Zotero.Retractions = { // If no cache file or it was created with a different version, download list at startup if (!this._cacheETag || this._cacheVersion != this._version) { - Zotero.Schema.schemaUpdatePromise.then(() => this.updateFromServer()); + Zotero.Schema.schemaUpdatePromise.then(() => { + if (Zotero.test) { + Zotero.debug("Skipping retraction list download in test mode"); + return; + } + this.updateFromServer(); + }); } },