diff options
author | Timo Tijhof <ttijhof@wikimedia.org> | 2012-04-11 19:26:06 +0200 |
---|---|---|
committer | Timo Tijhof <ttijhof@wikimedia.org> | 2012-04-11 19:26:06 +0200 |
commit | fcdeff9945544ff52e43001a8c09e9aa544d1faf (patch) | |
tree | 29d5d9695cd7989626313632d0cdbeb913232ce2 /tests/qunit/data | |
parent | a1f24d5ac6a44032828a9fec496c7b18ba3c3b9b (diff) | |
download | mediawikicore-fcdeff9945544ff52e43001a8c09e9aa544d1faf.tar.gz mediawikicore-fcdeff9945544ff52e43001a8c09e9aa544d1faf.zip |
Increase QUnit async stop() timeout limit, improve documentation
- Raise from 5s to 10s. Should fix the false positives that sometimes
happens in TestSwarm if a VM is being slow (especially IE6).
Change-Id: I4bc00b34040f5659c8456ce6978627c32497656d
Diffstat (limited to 'tests/qunit/data')
-rw-r--r-- | tests/qunit/data/testrunner.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js index 30ae5bc79bbd..f4baf9555252 100644 --- a/tests/qunit/data/testrunner.js +++ b/tests/qunit/data/testrunner.js @@ -10,24 +10,26 @@ var mwTestIgnore, mwTester, addons; * or 'data/test.php?foo=bar'). * @return {String} Such as 'data/foo.js?131031765087663960' */ -QUnit.fixurl = function (value) { +QUnit.fixurl = function ( value ) { return value + (/\?/.test( value ) ? '&' : '?') + String( new Date().getTime() ) - + String( parseInt( Math.random()*100000, 10 ) ); + + String( parseInt( Math.random() * 100000, 10 ) ); }; /** * Configuration */ -QUnit.config.testTimeout = 5000; -/** - * MediaWiki debug mode - */ +// When a test() indicates asynchronicity with stop(), +// allow 10 seconds to pass before killing the test(), +// and assuming failure. +QUnit.config.testTimeout = 10 * 1000; + +// Add a checkbox to QUnit header to toggle MediaWiki ResourceLoader debug mode. QUnit.config.urlConfig.push( 'debug' ); /** - * Load TestSwarm agent + * Load TestSwarm agent */ // Only if the current url indicates that there is a TestSwarm instance watching us // (TestSwarm appends swarmURL to the test suites url it loads in iframes). |