pytest: fix flake in test_gossip_force_broadcast_channel_msgs
What changed, and why it matters
This commit adjusts a single test assertion in a Python test file. The test was occasionally failing because the number of network 'ping' messages observed during gossip testing could be 4 instead of the previously allowed maximum of 3. The fix simply raises the allowed threshold from 3 to 5. It does not change any production code, protocol behavior, or security logic.
No security action needed. This is a benign test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In tests/test_gossip.py, the assertion assert tally['ping'] <= 3 is changed to assert tally['ping'] <= 5. The commit message explains that extra padding pings can cause the count to exceed 3, producing a flaky test failure. This is purely a test-flake tolerance adjustment.
Changed components
tests/test_gossip.pyInspect captured patch +1 / −1
diff --git a/tests/test_gossip.py b/tests/test_gossip.py
index b4c373da..e0b1ed9b 100644
--- a/tests/test_gossip.py
+++ b/tests/test_gossip.py
@@ -2393,7 +2393,7 @@ def test_gossip_force_broadcast_channel_msgs(node_factory, bitcoind):
# Make sure the noise is within reasonable bounds
assert tally['query_short_channel_ids'] <= 1
assert tally['query_channel_range'] <= 1
- assert tally['ping'] <= 3
+ assert tally['ping'] <= 5
assert tally['gossip_filter'] >= 1
del tally['query_short_channel_ids']
del tally['query_channel_range']
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.