]> source.dussan.org Git - jquery.git/commitdiff
Build: increase timeout in Promises/A+ tests 10 times
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Wed, 20 Sep 2017 13:36:40 +0000 (15:36 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 25 Sep 2017 17:27:50 +0000 (19:27 +0200)
The promises-aplus-tests sets up a default 200 ms Mocha timeout. This makes
our tests randomly fail on Jenkins. 2 seconds will be safer.

Closes gh-3791

build/tasks/promises_aplus_tests.js

index c634da5f7b0f94197f25adeb6e942ba816368e0a..5bd20ecdc3792301fa363cdc4621328a2ee7f6de 100644 (file)
@@ -2,7 +2,8 @@ module.exports = function( grunt ) {
 
        "use strict";
 
-       var spawnTest = require( "./lib/spawn_test.js" );
+       var timeout = 2000,
+               spawnTest = require( "./lib/spawn_test.js" );
 
        grunt.registerTask( "promises_aplus_tests",
                [ "promises_aplus_tests:deferred", "promises_aplus_tests:when" ] );
@@ -10,14 +11,16 @@ module.exports = function( grunt ) {
        grunt.registerTask( "promises_aplus_tests:deferred", function() {
                spawnTest( this.async(),
                        __dirname + "/../../node_modules/.bin/promises-aplus-tests" +
-                               " test/promises_aplus_adapters/deferred.js"
+                               " test/promises_aplus_adapters/deferred.js" +
+                               " --timeout " + timeout
                );
        } );
 
        grunt.registerTask( "promises_aplus_tests:when", function() {
                spawnTest( this.async(),
                        __dirname + "/../../node_modules/.bin/promises-aplus-tests" +
-                               " test/promises_aplus_adapters/when.js"
+                               " test/promises_aplus_adapters/when.js" +
+                               " --timeout " + timeout
                );
        } );
 };