fix(tests): restore main's cmuxTests build
Closed
AU
2mo ago+28+28+01234567890123456789-7-7-0123456789
main's app compiles again, but its cmuxTests bundle doesn't, so no app-host test can run. Three merges each left test code that doesn't compile. Each fix alone still fails compile on the other two, so this PR carries all three. Part of #15488.
| error on main (job) | cause | fix |
|---|---|---|
LastSurfaceClosePreferenceTests.swift and WorkspaceCloseTabsContextMenuTests.swift: argument passed to call that takes no arguments | #15381 calls drainMainQueue(timeout:); the shared helper in TabManagerUnitTests.swift takes no arguments | the helper takes timeout: TimeInterval = 1.0 (carried from #16232, credited to Leo Li) |
CLIVMTransferTests.swift:730: type 'CMUXCLI' (aka 'CmuxTuiRemoteRouting') has no member 'vmReadyPollInterval' | #15381 calls a CLI function from the app-hosted test target, where CMUXCLI names the app's routing type | the policy check moves to cmuxCLITests/CLIVMReadyPollIntervalTests.swift, which builds the CLI (carried from #16242) |
PaneResizeShortcutTests.swift:66: cannot find 'controller' in scope | #15420 (d0dd2261aee) resolved a merge by dropping let controller = workspace.bonsplitController while the divider assertions still use it | the binding comes back before its first use |
The carried commits match #16232 and #16242 byte for byte, so whichever lands second merges cleanly.
Verification
scripts/lint-pbxproj-test-wiring.shandscripts/sync-test-wiring --checkpass (1188 files).- This PR's compile admission and app-host CI.
No local build; this Mac does not compile cmux.
Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Restores main's cmuxTests build so app-hosted tests compile and run again. Three merges each broke the bundle with code that doesn't compile, and no single fix works without the other two.
Bug Fixes
drainMainQueue()now accepts an optionaltimeoutargument, matching the callers added in #15381.CLIVMTransferTestsstops callingvmReadyPollIntervalon the app's routing type; the policy check moves to a newCLIVMReadyPollIntervalTests.swiftin the CLI test target, which covers valid overrides and the fallback to the 3s default for missing, malformed, or out-of-range values.- Restores the
controllerbinding inPaneResizeShortcutTeststhat a merge dropped while the divider assertions still used it.
Summary by CodeRabbit
- Tests
- Added automated checks for CLI startup polling intervals, verifying that invalid or out-of-range settings use the 3-second default and accepted values are applied.
- Improved test reliability for pane resizing and divider movement by capturing the controller after the layout settles.
- Made tab-management test wait timing configurable, with a 1-second default. These changes affect test coverage and behavior only; no user-facing features changed.