From b5a33456e3feaafd50f41c201a714f9525e1d889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Tue, 19 Sep 2006 10:18:57 +0000 Subject: [PATCH] Clear timeout (prevents freezing of test suite when async tests fail) when start is called --- build/test/data/testrunner.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/test/data/testrunner.js b/build/test/data/testrunner.js index a72a1c17..db97215b 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(); }