pytest: reduce test_funding_v2_cancel_race nodes under CI.
What changed, and why it matters
This commit only changes test settings. It reduces the number of simulated network nodes used in two automated tests when running on slow CI machines, because 100 nodes was causing the test runner to time out and exit with code 143 (a kill signal). There is no change to production code, no security fix, and no vulnerability.
No security action needed. Treat as routine test infrastructure maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies tests/test_connection.py to import SLOW_MACHINE and use it to lower the node count from 100 to 20 in test_funding_cancel_race and test_funding_v2_cancel_race when running on slow machines. VALGRIND already lowered the count to 5. This is purely a test-flakiness/timeout mitigation; no Core Lightning node logic is altered.
Changed components
tests/test_connection.pyInspect captured patch +5 / −1
diff --git a/tests/test_connection.py b/tests/test_connection.py
index f0623c78..ffbf3c9e 100644
--- a/tests/test_connection.py
+++ b/tests/test_connection.py
@@ -13,7 +13,7 @@ from utils import (
mine_funding_to_announce, first_scid,
CHANNEL_SIZE
)
-from pyln.testing.utils import VALGRIND, EXPERIMENTAL_DUAL_FUND, FUNDAMOUNT, RUST
+from pyln.testing.utils import VALGRIND, EXPERIMENTAL_DUAL_FUND, FUNDAMOUNT, RUST, SLOW_MACHINE
import os
import pytest
@@ -1476,6 +1476,8 @@ def test_funding_cancel_race(node_factory, bitcoind, executor):
if VALGRIND:
num = 5
+ elif SLOW_MACHINE:
+ num = 20
else:
num = 100
@@ -1557,6 +1559,8 @@ def test_funding_v2_cancel_race(node_factory, bitcoind, executor):
if VALGRIND:
num = 5
+ elif SLOW_MACHINE:
+ num = 20
else:
num = 100
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.