From d6940654f13d0341297f4b163a94d9c62e98ced8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 23 Dec 2025 12:25:21 +0000 Subject: [PATCH] radicle-node: cap test threads to fix timing-sensitive tests The rad_init_sync_preferred test has a 5-second timeout waiting for RefsSynced events. On loaded builders with many parallel tests, this timeout can be exceeded causing test failures. Cap RUST_TEST_THREADS to 4 (or NIX_BUILD_CORES if lower) to reduce contention and give timing-sensitive sync tests a better chance of completing within their timeouts. --- pkgs/by-name/ra/radicle-node/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ra/radicle-node/package.nix b/pkgs/by-name/ra/radicle-node/package.nix index ee91336d5ada..e9a0806c5fa2 100644 --- a/pkgs/by-name/ra/radicle-node/package.nix +++ b/pkgs/by-name/ra/radicle-node/package.nix @@ -67,6 +67,12 @@ rustPlatform.buildRustPackage (finalAttrs: { export PATH=$PATH:$PWD/target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release # Tests want to open many files. ulimit -n 4096 + # Cap test threads to avoid timing issues on loaded builders (sync timeout is 5s) + max_threads=4 + if [[ -n "$NIX_BUILD_CORES" && "$NIX_BUILD_CORES" -lt "$max_threads" ]]; then + max_threads=$NIX_BUILD_CORES + fi + export RUST_TEST_THREADS=$max_threads ''; checkFlags = [ "--skip=service::message::tests::test_node_announcement_validate"