From 928c580a1a5fb328604ee94e33f440a326754ae1 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Wed, 19 Jul 2017 11:45:03 -0400 Subject: [PATCH] Tests: Reduce the abort timeout for simple focus testing Ref gh-3732 --- test/data/testrunner.js | 2 +- test/unit/event.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/test/data/testrunner.js b/test/data/testrunner.js index b8f1127ab..d5120c6a0 100644 --- a/test/data/testrunner.js +++ b/test/data/testrunner.js @@ -15,7 +15,7 @@ var oldCacheLength = 0, // Max time for stop() and asyncTest() until it aborts test // and start()'s the next test. -QUnit.config.testTimeout = 12e4; // 2 minutes +QUnit.config.testTimeout = 60e3; // 1 minute // Enforce an "expect" argument or expect() call in all test bodies. QUnit.config.requireExpects = true; diff --git a/test/unit/event.js b/test/unit/event.js index 8a8a5589e..811922cb4 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -2810,13 +2810,9 @@ QUnit.test( "preventDefault() on focusin does not throw exception", function( as done(); done = null; } ); - - // This test can be unreliable in CI... try two methods to prompt a focusin event - // and set an abort timeout input.trigger( "focus" ); - try { - input[ 0 ].focus(); - } catch ( e ) {} + + // DOM focus is unreliable in TestSwarm CI; set an abort timeout setTimeout( function() { if ( !done ) { return; @@ -2824,7 +2820,7 @@ QUnit.test( "preventDefault() on focusin does not throw exception", function( as assert.ok( true, "Did not intercept focusin" ); done(); done = null; - }, QUnit.config.testTimeout / 2 || 1000 ); + }, QUnit.config.testTimeout / 4 || 1000 ); } ); QUnit.test( "Donor event interference", function( assert ) { -- 2.39.5