fix: deflake //rs/tests/consensus/tecdsa:tecdsa_add_nodes_test#8991
Open
basvandijk wants to merge 1 commit intomasterfrom
Open
fix: deflake //rs/tests/consensus/tecdsa:tecdsa_add_nodes_test#8991basvandijk wants to merge 1 commit intomasterfrom
basvandijk wants to merge 1 commit intomasterfrom
Conversation
Increase timeouts and retry counts to fix flakiness. Root cause: The test's per-task timeout of 600s (default) is too tight for the operations performed by the test function: - NNS canister installation (19-139s observed, up to 300s timeout) - Chain key enabling via proposals (~60s) - Getting public keys for 4 key types (each 30-120s) - Pre-signature stash assertions (up to 500s READY_WAIT_TIMEOUT) - Node addition proposals - await_subnet_earliest_topology_version (up to 500s READY_WAIT_TIMEOUT) - Key rotation metric checks with only 30 retries x 3s = 90s max - Progress checks on all 7 nodes (up to 100s each) Three failure modes were observed across 3 flaky runs in the past week: 1. NNS canister install timing out within the test function 2. assert_metric_sum failing after 30 retries (90s too short for key rotation) 3. Overall 600s per-task timeout hit while waiting for topology propagation Changes: - Set overall_timeout and timeout_per_test to 900s (matching Bazel long timeout) - Increase assert_metric_sum retries from 30 to 60 (180s max for key rotation) 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/consensus/tecdsa:tecdsa_add_nodes_testis slightly flaky:Failing for different reasons:
Claude Opus 4.6 made the following Root Cause Analysis and accompanying fixes:
Root Cause
The test's per-task timeout of 600s (default
DEFAULT_TIMEOUT_PER_TEST) is too tight for the operations performed in the test function. The test does NNS canister installation, chain key operations, node addition, topology propagation, key rotation verification, progress checks, and signature tests — all within a single test function that gets 600s.Three failure modes were observed across 3 flaky runs in the past week:
assert_metric_sumfailed after only 30 retries × 3s = 90s, which was not enough time for key rotation to complete after adding 3 nodes (Feb 19)await_subnet_earliest_topology_version(Feb 20)Changes
NNS_CANISTER_INSTALL_TIMEOUTwas already increased from 160s to 300s by:fix: deflake //rs/tests/nns:bitcoin_set_config_proposal_test #8951.
overall_timeoutandtimeout_per_testto 900s (matching Bazel'slongtest timeout), up from the 600s defaultassert_metric_sumretries from 30 to 60 (180s max wait for key rotation, up from 90s)Skill:
.claude/skills/fix-flaky-tests/SKILL.md.