fix: deflake //rs/tests/ckbtc:ckbtc_minter_update_balance_head_nns#9723
Draft
basvandijk wants to merge 2 commits intomasterfrom
Draft
fix: deflake //rs/tests/ckbtc:ckbtc_minter_update_balance_head_nns#9723basvandijk wants to merge 2 commits intomasterfrom
basvandijk wants to merge 2 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Deflakes the ckbtc_minter_update_balance_head_nns test by preventing transport-level timeouts from immediately failing the test when the ledger canister is intentionally stopped.
Changes:
- Updated
assert_temporarily_unavailableto retry onic_agenttransport errors (e.g., HTTP timeouts) instead of panicking. - Extended
assert_temporarily_unavailableto accept aLoggerand useretry_with_msg_async!for structured retries. - Updated the
ckbtc_minter_update_balancetest to pass the logger intoassert_temporarily_unavailable.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
rs/tests/ckbtc/src/utils.rs |
Adds retry logic for agent transport errors in assert_temporarily_unavailable and updates imports/signature accordingly. |
rs/tests/ckbtc/ckbtc_minter_update_balance.rs |
Updates the test call site to match the new helper signature (passes logger). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4ccbdee to
61951e0
Compare
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.
Root Cause
The
assert_temporarily_unavailablefunction inrs/tests/ckbtc/src/utils.rscalled.expect()on the agent'supdate_balanceresult, which panics on transport errors. The test failed with a TCP-level timeout (hyper::Error(Io, Kind(TimedOut))) when making an HTTP request to the replica node. This is a transient infrastructure/networking issue, but the function did not handle it, causing the test to fail instead of retrying.Fix
This PR was created following the steps in
.claude/skills/fix-flaky-tests/SKILL.md.