From fcdeff9945544ff52e43001a8c09e9aa544d1faf Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 11 Apr 2012 19:26:06 +0200 Subject: [PATCH] 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 --- tests/qunit/data/testrunner.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js index 30ae5bc79b..f4baf95552 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). -- 2.20.1