test: raise Keychain retry budget to stop the macos-15 selection flake - #94
Merged
Merged
Conversation
RetryHelper defaulted to 20 attempts x 25 ms ~= 500 ms. On a contended macos-15 runner that was too tight for cross-process Keychain visibility: the selection item written by RestoreCredentialAsync was not always visible within it, so RestoreCredentialAsync_PreservesAccountIdAndSelection timed out its IsSelected retry and the following Assert.True(restored.IsSelected) failed intermittently (seen red on #89 and #92, green on re-run and elsewhere). Raise the default budget to 40 x 50 ms ~= 2 s. Retries return as soon as the store is consistent, so a passing run does not pay the ceiling; only a genuine failure now waits the full ~2 s before surfacing. RetryHelperTests pass explicit values and are unaffected. Test-only change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
KeychainCredentialManagerTests.RestoreCredentialAsync_PreservesAccountIdAndSelectionflakes on the macos-15 CI leg (Assert.True() Failure — Expected: True, Actual: False) — seen red on #89 and #92, green on re-run and on macos-14. It's a cross-process Keychain visibility timing flake, not a product defect.RetryHelper's default budget was20 × 25 ms ≈ 500 ms. AfterRestoreCredentialAsync, the selection is a separate store item written moments earlier; on a contended macos-15 runner it wasn't always visible within 500 ms, soUntilAsyncreturned its last result withIsSelected == falseand the following assertion failed.Fix
Raise the default budget to
40 × 50 ms ≈ 2 s. Retries return as soon as the store is consistent, so passing runs don't pay the ceiling; only a genuine failure now waits ~2 s before surfacing.RetryHelperTestspass explicit values and are unaffected.Test-only change; documented in
RetryHelper's remarks andCHANGELOG.md.🤖 Generated with Claude Code