Repository navigation
test: give slow edit-mode and AeroSpace mode waits room to finish - #191
Merged
Merged
Conversation
|
🎉 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
Three tests fail now and then because they wait a fixed number of 10 ms polls for something that sometimes takes longer:
BarEditViewTests.testUnorderedWindowsLayOutAllSectionsAndReportWidgetFramesWithoutRevealingTheNormalBarfailed in 2 of 5 fullswift testruns onmain. Since fix: ease in and out of bar editing #168, ending bar editing fades the edit view out overanimationDuration, and the view stays in the hierarchy until the fade ends. That took 19–21 polls (about 0.3 s), and the test allowed 20.scriptOutputOnlyModeDemandSurvivesPresentationEditsAndSourceSwitchClearsItandthemeSwitchInActiveModeRecomputesTokensAndRetainsTheConnectionAndScriptswait for the AeroSpace fixture script to start and send its mode. Run in a batch beside other suites (swift test --filter "TransitionTests|PresentationTests|WidgetTests|ModuleConfigurationTests"), that took 90–126 of 100 polls and 20–76 of 80, so they failed in 2 of 4 runs onmain. Nothing inWorkspaceStoredelays the subscription; the time goes to starting the process and getting back on the main actor while other tests hold it.Changes
Those three waits get a budget of 500 polls, as
expiry(of:)inPresentationTestsalready does for the same reason. The loops stop as soon as their condition holds, so passing runs take no longer. No other test changes.Testing
swift testrun passed five times in a row, and the batch above four times in a row.subscriptionReadsInitialModeReconnectsAndDoesNotQueryWorkspacesForModeOnlyEventsused up to 64 of its 160 polls and never failed, so it's unchanged.Merging
One commit, so a squash keeps the same message. #192 (animation presets) needs this first: its default edit-mode fade lasts 0.35 s, so the edit view test fails there every time without it.
Claude Opus 5.5 via Claude Code (in T3 Code)