From 503532cf7774a826f031ea1459abc304ca4b819b Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 10 Aug 2022 00:36:14 +0100 Subject: [PATCH] workaround sporadic I/O lags in GitHub Actions (#5613) --- test/mocha.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mocha.js b/test/mocha.js index 9a19bd92..96edde98 100644 --- a/test/mocha.js +++ b/test/mocha.js @@ -68,7 +68,8 @@ process.nextTick(function run() { if (task.length) { task.timeout = function(limit) { clearTimeout(timer); - task.limit = limit + lag; + limit += lag; + task.limit = limit; timer = setTimeout(function() { raise(new Error("Timed out: exceeds " + limit + "ms")); }, limit);