Repository navigation
test: let the app menu tests decide when a retry runs - #179
Merged
Merged
Conversation
This was referenced Oct 22, 2026
|
🎉 This PR is included in version 0.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Since #174, the app menu recovery tests in
NativePresentationTestsfail on most CI runs, each time with one extra menu read:main's run for #176, and both runs of #177. A failed read is retried 250 ms later. The tests wait for that failed read, then change the fixture (clear the failure, revoke access, switch apps) and expect the retry to see the change. On a busy runner the test can take longer than 250 ms to resume, so the retry runs first, fails again, and a later retry adds the extra read.Changes
AppMenutakes its retry wait as an init parameter, defaulting toTask.sleep, like it already takescheckAccessandreadAttribute. The app's behavior is unchanged.MenuReadFixtureholds each retry (any non-zero wait) until the test callsallowRetry(), and stops waiting when the read task is cancelled. The five tests that change the fixture while a retry is pending callallowRetry()after their change, so a retry can no longer run before the test has changed the fixture, however slow the runner.menuRecoveryStopsAfterFourRetrieskeeps the real waits.Testing
swift test --filter NativePresentationTests: passes three times in a row.main, 4 tests fail with the same extra reads CI shows (7 issues); with this change they pass.Merging
One commit, so a squash keeps the same message. It unblocks #177 and #178, and the beta that
main's failed run skipped.Claude Opus 5.5 via Claude Code (in T3 Code)