Index: trunk/phase3/tests/qunit/data/testrunner.js |
— | — | @@ -11,6 +11,11 @@ |
12 | 12 | }; |
13 | 13 | |
14 | 14 | /** |
| 15 | + * Configuration |
| 16 | + */ |
| 17 | +QUnit.config.testTimeout = 5000; |
| 18 | + |
| 19 | +/** |
15 | 20 | * Load TestSwarm agent |
16 | 21 | */ |
17 | 22 | if ( QUnit.urlParams.swarmURL ) { |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.test.js |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | expect(1); |
133 | 133 | |
134 | 134 | // Asynchronous ahead |
135 | | - stop(5000); |
| 135 | + stop(); |
136 | 136 | |
137 | 137 | mw.loader.implement( 'is.awesome', [QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/defineTestCallback.js' )], {}, {} ); |
138 | 138 | |
— | — | @@ -155,9 +155,9 @@ |
156 | 156 | // Message doesn't exist already |
157 | 157 | ok( !mw.messages.exists( 'bug29107' ) ); |
158 | 158 | |
159 | | - // Async! Include a timeout, as failure in this test leads to neither the |
160 | | - // success nor failure callbacks getting called. |
161 | | - stop(5000); |
| 159 | + // Async! Failure in this test may lead to neither the success nor error callbacks getting called. |
| 160 | + // Due to QUnit's timeout feauture we won't hang here forever if this happends. |
| 161 | + stop(); |
162 | 162 | |
163 | 163 | mw.loader.implement( 'bug29107.messages-only', [], {}, {'bug29107': 'loaded'} ); |
164 | 164 | mw.loader.using( 'bug29107.messages-only', function() { |
— | — | @@ -180,9 +180,8 @@ |
181 | 181 | base = ('//' + loc.hostname + loc.pathname).replace(/\/[^\/]*$/, ''), |
182 | 182 | target = base + '/data/qunitOkCall.js?' + (new Date()).getTime(); |
183 | 183 | |
184 | | - // Async! Include a timeout, as failure in this test leads to neither the |
185 | | - // success nor failure callbacks getting called. |
186 | | - stop(5000); |
| 184 | + // Async! |
| 185 | + stop(); |
187 | 186 | mw.loader.load( target ); |
188 | 187 | }); |
189 | 188 | |