fix: deflake //rs/tests/networking:firewall_max_connections_test#8983
Open
basvandijk wants to merge 2 commits intomasterfrom
Open
fix: deflake //rs/tests/networking:firewall_max_connections_test#8983basvandijk wants to merge 2 commits intomasterfrom
basvandijk wants to merge 2 commits intomasterfrom
Conversation
Root cause: The test creates 1000 TCP connections sequentially to a node, each with a 2-second handshake timeout. Under load, individual TCP handshakes can transiently take longer than 2 seconds, causing the test to fail at varying connection numbers (observed at connections 56, 745, and 878 in recent CI runs). Fix: - Increase TCP_HANDSHAKE_TIMEOUT from 2s to 5s. - Use retry_with_msg! macro (30s timeout, 1s backoff) around each connection attempt, so transient timeouts are retried instead of immediately panicking. Skill: .claude/skills/fix-flaky-tests/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
//rs/tests/networking:firewall_max_connections_testis slightly flaky:Always failing in a similar way:
Claude Opus 4.6 provided the following Root Cause Analysis and accompanying fix:
Root Cause
The test creates 1000 TCP connections sequentially to a node, each with a 2-second handshake timeout. Under load, individual TCP handshakes can transiently take longer than 2 seconds, causing the test to fail at varying connection numbers (observed at connections 56, 745, and 878 in recent CI runs).
Fix
TCP_HANDSHAKE_TIMEOUTfrom 2s to 5s to give more headroom for individual handshakes.retry_with_msg!(30s timeout, 1s backoff) so transient timeouts are retried instead of immediately panicking.Affected Tests
//rs/tests/networking:firewall_max_connections_test//rs/tests/networking:firewall_max_connections_test_head_nnsSkill:
.claude/skills/fix-flaky-tests/SKILL.md.