From 894c869781344cd1076e2d6174f82489ae3acfe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:44:01 +0200 Subject: [PATCH] fix(ci): increase karma capture timeout to avoid flaky Chrome launches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ChromeHeadless intermittently failed to capture within the previous 5s timeout on cold CI runners, causing spurious JS Unit failures on master even for commits touching no JS (e.g. translation-only changes). Raise captureTimeout to 60s (Karma's default) and tolerate a couple of transient browser disconnects so a slow launch no longer fails the job. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- js/karma.conf.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/karma.conf.js b/js/karma.conf.js index 21aebe45..8c3c244e 100644 --- a/js/karma.conf.js +++ b/js/karma.conf.js @@ -85,8 +85,14 @@ module.exports = function(config) { } }, - // If browser does not capture in given timeout [ms], kill it - captureTimeout: 5000, + // If browser does not capture in given timeout [ms], kill it. + // Cold CI runners need ample time to download/spawn headless Chrome; + // the previous 5s value caused frequent flaky launch timeouts. + captureTimeout: 60000, + + // Retry capturing the browser a few times before giving up, to ride + // out transient launch hiccups on CI. + browserDisconnectTolerance: 2, // Continuous Integration mode // if true, it capture browsers, run tests and exit