From 2798a785a67acefd39084a68580a9d83bc5d479d Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Mon, 31 Aug 2026 18:20:44 +0530 Subject: [PATCH] repath-studio: fix flaky tests in sandbox Signed-off-by: phanirithvij (cherry picked from commit afeb7f7963f922b67532ec3b93c755500d345044) --- .../re/repath-studio/fix-karma-sandbox.patch | 23 +++++++++++++++++++ pkgs/by-name/re/repath-studio/package.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/by-name/re/repath-studio/fix-karma-sandbox.patch diff --git a/pkgs/by-name/re/repath-studio/fix-karma-sandbox.patch b/pkgs/by-name/re/repath-studio/fix-karma-sandbox.patch new file mode 100644 index 000000000000..1c78fa1bc21c --- /dev/null +++ b/pkgs/by-name/re/repath-studio/fix-karma-sandbox.patch @@ -0,0 +1,23 @@ +--- a/karma.conf.js ++++ b/karma.conf.js +@@ -7,7 +7,7 @@ + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: 'ChromeHeadless', +- flags: ['--no-sandbox'] ++ flags: ['--no-sandbox', '--disable-dev-shm-usage'] + }, + CustomElectron: { + base: 'Electron', +@@ -42,6 +42,10 @@ + outputDir: junitOutputDir + '/karma', // results will be saved as outputDir/browserName.xml + outputFile: undefined, // if included, results will be saved as outputDir/browserName/outputFile + suite: '' // suite will become the package name attribute in xml testsuite element +- } ++ }, ++ ++ browserDisconnectTimeout: 300000, ++ browserNoActivityTimeout: 300000, ++ pingTimeout: 300000 + }) + } diff --git a/pkgs/by-name/re/repath-studio/package.nix b/pkgs/by-name/re/repath-studio/package.nix index 5f62e0f037b1..9a3c24292f79 100644 --- a/pkgs/by-name/re/repath-studio/package.nix +++ b/pkgs/by-name/re/repath-studio/package.nix @@ -36,6 +36,8 @@ buildNpmPackage (finalAttrs: { # outputHash of clojureHome changes each time `clojure` is updated # https://github.com/ngi-nix/ngipkgs/pull/1727#discussion_r2470180998 ./pin-clojure.patch + # checks have become flaky in nix build sandbox, increase timeout and disable dev/shm for chrome + ./fix-karma-sandbox.patch ./0001-disable-auto-update-check.patch ];