www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7e5b46b146fba5d34ffc6a6af2717d08d9b5417a
parent 2f562a4fdf018f3b93cb3611bae2e9a42451b99e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 25 Jun 2016 07:30:35 -0400

Merge pull request #1048 from adomasven/fix/linux-test-failures

Fixes freezing occuring on linux while running tests
Diffstat:
Mtest/content/support.js | 2+-
Mtest/tests/server_connectorTest.js | 4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/content/support.js b/test/content/support.js @@ -137,7 +137,7 @@ function waitForDialog(onOpen, button='accept', url) { function acceptWhenEnabled() { // Handle delayed buttons if (dialog.document.documentElement.getButton(button).disabled) { - setTimeout(function () { + dialog.setTimeout(function () { acceptWhenEnabled(); }, 250); } diff --git a/test/tests/server_connectorTest.js b/test/tests/server_connectorTest.js @@ -14,10 +14,12 @@ describe("Connector Server", function () { win = yield loadZoteroPane(); connectorServerPath = 'http://127.0.0.1:' + Zotero.Prefs.get('httpServer.port'); - testServerPath = 'http://127.0.0.1:' + testServerPort; }); beforeEach(function () { + // Alternate ports to prevent exceptions not catchable in JS + testServerPort += (testServerPort & 1) ? 1 : -1; + testServerPath = 'http://127.0.0.1:' + testServerPort; httpd = new HttpServer(); httpd.start(testServerPort); });