Merge pull request #1048 from adomasven/fix/linux-test-failures
Fixes freezing occuring on linux while running tests
This commit is contained in:
commit
7e5b46b146
2 changed files with 4 additions and 2 deletions
|
@ -137,7 +137,7 @@ function waitForDialog(onOpen, button='accept', url) {
|
||||||
function acceptWhenEnabled() {
|
function acceptWhenEnabled() {
|
||||||
// Handle delayed buttons
|
// Handle delayed buttons
|
||||||
if (dialog.document.documentElement.getButton(button).disabled) {
|
if (dialog.document.documentElement.getButton(button).disabled) {
|
||||||
setTimeout(function () {
|
dialog.setTimeout(function () {
|
||||||
acceptWhenEnabled();
|
acceptWhenEnabled();
|
||||||
}, 250);
|
}, 250);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,12 @@ describe("Connector Server", function () {
|
||||||
|
|
||||||
win = yield loadZoteroPane();
|
win = yield loadZoteroPane();
|
||||||
connectorServerPath = 'http://127.0.0.1:' + Zotero.Prefs.get('httpServer.port');
|
connectorServerPath = 'http://127.0.0.1:' + Zotero.Prefs.get('httpServer.port');
|
||||||
testServerPath = 'http://127.0.0.1:' + testServerPort;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(function () {
|
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 = new HttpServer();
|
||||||
httpd.start(testServerPort);
|
httpd.start(testServerPort);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue