Skip to content
Permalink
Browse files

Clear timeout (prevents freezing of test suite when async tests fail)…

… when start is called
  • Loading branch information
jzaefferer committed Sep 19, 2006
1 parent b0c3711 commit b5a33456e3feaafd50f41c201a714f9525e1d889
Showing with 4 additions and 1 deletion.
  1. +4 −1 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();
}

0 comments on commit b5a3345

Please sign in to comment.
You can’t perform that action at this time.