fix(ci): improve test stability on high-core-count runners #2249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
CI tests have been flaky on self-hosted runners with high core counts (64 CPUs on technic). Multiple different tests fail intermittently with timeouts:
test_put_contracttest_put_contract_three_hop_returns_responsetest_put_merge_persists_statetest_update_contracttest_three_node_network_connectivitytest_logger_capture*Additionally, the
six-peer-regressionjob fails with a linker error when building freenet fresh:Root Cause
Test thread contention: Cargo defaults to one test thread per CPU. With 64 CPUs, 64+ network tests run simultaneously, causing:
Library path not set: When
six-peer-regressionbuilds freenet from river's workspace (fresh build, no cache), the linker can't find liblzma because rust-lld doesn't search/usr/libby default on Arch Linux.Solution
--test-threads=8) - reduces parallel test execution to a manageable levelLIBRARY_PATHandPKG_CONFIG_PATHfor the six-peer-regression jobTesting
[AI-assisted - Claude]