From: Jörn Zaefferer Date: Tue, 19 Sep 2006 10:18:57 +0000 (+0000) Subject: Clear timeout (prevents freezing of test suite when async tests fail) when start... X-Git-Tag: 1.0.2~47 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b5a33456e3feaafd50f41c201a714f9525e1d889;p=jquery.git Clear timeout (prevents freezing of test suite when async tests fail) when start is called --- diff --git a/build/test/data/testrunner.js b/build/test/data/testrunner.js index a72a1c17c..db97215be 100644 --- a/build/test/data/testrunner.js +++ b/build/test/data/testrunner.js @@ -8,6 +8,7 @@ var stats = { }; var queue = []; var blocking = false; +var timeout; function synchronize(callback) { queue[queue.length] = callback; @@ -26,9 +27,11 @@ function process() { function stop() { blocking = true; - setTimeout(start, asyncTimeout * 1000); + timeout = setTimeout(start, asyncTimeout * 1000); } function start() { + if(timeout) + clearTimeout(timeout); blocking = false; process(); }