[tests] Fix flaky RecordTest.DeskCase_83099_InmutableDictionary on macOS CI#24908
[tests] Fix flaky RecordTest.DeskCase_83099_InmutableDictionary on macOS CI#24908rolfbjarne merged 1 commit intomainfrom
Conversation
…cOS CI The test fails intermittently when the keychain has stale entries from previous runs, causing Query to return ItemNotFound while Add returns DuplicateItem. Fix the flakiness with three changes: - Clean up any stale keychain entry before the test starts - In SaveUserPassword, handle the DuplicateItem race by removing the stale entry and retrying the add - Wrap the test body in try/finally to ensure cleanup on failure - Fix the missing $ in TEST 3's interpolated string assertion Fixes #24860 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Stabilizes a flaky keychain-related test in the monotouch macOS CI suite by ensuring stale keychain entries don’t interfere with add/query/update flows.
Changes:
- Pre-cleans and always post-cleans the keychain entry used by
DeskCase_83099_InmutableDictionary(try/finally). - Makes
SaveUserPasswordresilient to the “query ItemNotFound + add DuplicateItem” inconsistent keychain state by removing and retrying the add. - Fixes an assertion message to correctly use string interpolation.
You can also share your feedback on Copilot code review. Take the survey.
✅ [CI Build #20fdf28] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #20fdf28] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #20fdf28] Build passed (Build macOS tests) ✅Pipeline on Agent |
🚀 [CI Build #20fdf28] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
The test fails intermittently when the keychain has stale entries from
previous runs, causing Query to return ItemNotFound while Add returns
DuplicateItem.
Fix the flakiness with three changes:
stale entry and retrying the add
Fixes #24860