From 4e50b7ddc2950cb98115eff4376534907e57edcc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 26 Apr 2016 02:16:37 -0400 Subject: [PATCH] Increase default test timeout to 10 seconds on Travis Maybe this will fix some of the intermittent failures... --- test/components/zotero-unit.js | 1 + test/content/runtests.js | 2 +- test/runtests.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/components/zotero-unit.js b/test/components/zotero-unit.js index 9f7c28fcdc..2d2898913f 100644 --- a/test/components/zotero-unit.js +++ b/test/components/zotero-unit.js @@ -38,6 +38,7 @@ ZoteroUnit.prototype = { this.runTests = !this.makeTestData; this.bail = cmdLine.handleFlag("bail", false); this.grep = cmdLine.handleFlagWithParam("grep", false); + this.timeout = cmdLine.handleFlagWithParam("ZoteroTestTimeout", false); }, dump:function(x) { diff --git a/test/content/runtests.js b/test/content/runtests.js index d9c86a1631..7ad9d2f275 100644 --- a/test/content/runtests.js +++ b/test/content/runtests.js @@ -178,7 +178,7 @@ Mocha.Runner.prototype.fail = function(test, err){ mocha.setup({ ui: "bdd", reporter: Reporter, - timeout: 5000, + timeout: ZoteroUnit.timeout || 5000, grep: ZoteroUnit.grep }); diff --git a/test/runtests.sh b/test/runtests.sh index 84bd94f015..c0dd2322d5 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -132,7 +132,7 @@ fi if [ "$TRAVIS" = true ]; then - FX_ARGS="$FX_ARGS -ZoteroNoUserInput" + FX_ARGS="$FX_ARGS -ZoteroNoUserInput -ZoteroTestTimeout 10000" fi # Clean up on exit