Skip to content

test: give slow edit-mode and AeroSpace mode waits room to finish - #191

Merged
Seb-GRAF merged 1 commit into
mainfrom
test/steady-mode-tests
Oct 22, 2026
Merged

Seb-GRAF merged 1 commit into
mainfrom
test/steady-mode-tests

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Three tests fail now and then because they wait a fixed number of 10 ms polls for something that sometimes takes longer:

  • BarEditViewTests.testUnorderedWindowsLayOutAllSectionsAndReportWidgetFramesWithoutRevealingTheNormalBar failed in 2 of 5 full swift test runs on main. Since fix: ease in and out of bar editing #168, ending bar editing fades the edit view out over animationDuration, 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.
  • scriptOutputOnlyModeDemandSurvivesPresentationEditsAndSourceSwitchClearsIt and themeSwitchInActiveModeRecomputesTokensAndRetainsTheConnectionAndScripts wait 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 on main. Nothing in WorkspaceStore delays 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:) in PresentationTests already 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

  • The full swift test run passed five times in a row, and the batch above four times in a row.
  • Measured the polls each wait needed by printing them from a temporary copy of the tests; the numbers above come from that.
  • subscriptionReadsInitialModeReconnectsAndDoesNotQueryWorkspacesForModeOnlyEvents used 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)

@Seb-GRAF
Seb-GRAF merged commit 0826bdb into main Oct 22, 2026
7 checks passed
@Seb-GRAF
Seb-GRAF deleted the test/steady-mode-tests branch October 22, 2026 08:53
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant