Skip to content

Commit fba0e8e

Browse files
authored
fix: deflake //rs/tests/idx:ii_delegation_test (#9796)
## Root Cause The `update()` method in `AgentWithDelegation` is fire-and-forget — it sends the HTTP call but doesn't poll for execution through consensus. The test then asserts the counter was incremented using `assert_canister_counter_with_retries`, but with only 10 retries × 1s = 10 seconds total wait time, the update may not have been processed through consensus yet. In the observed failure on 2026-04-08, the update was sent at 15:25:50 and the assertion timed out at 15:26:01 (~11 seconds), just barely exceeding the 10-second retry window. ## Fix Increased retry parameters from 10 retries × 1s (10s total) to 30 retries × 2s (60s total), giving ample time for the update to go through consensus. Verified with `--runs_per_test=3 --jobs=3` — all 3 runs passed (avg 67.9s). --- This PR was created following the steps in `.claude/skills/fix-flaky-tests/SKILL.md`.
1 parent 5c591fc commit fba0e8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rs/tests/idx/ii_delegation_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ pub fn test(env: TestEnv) {
134134
&counter_canister_id,
135135
vec![],
136136
1,
137-
10,
138-
Duration::from_secs(1),
137+
30,
138+
Duration::from_secs(2),
139139
));
140140
let expected_principal = Principal::self_authenticating(&ii_derived_public_key);
141141
info!(

0 commit comments

Comments
 (0)