Repository navigation
test: keep the window server's Space window lists out of unit tests - #640
Merged
Merged
Conversation
With no override set, try_space_window_list_for_connection asked the real WindowServer, and the tests' Space ids are real desktops on a Mac in use. Their windows replaced the test's in the membership, so a test window was taken as hidden: named_pin_reload_moves_immediately_without_growing_catalog and empty_active_space_membership_during_wake_race_does_not_blank_known_active_windows failed on any Mac with windows open on Space 1 and passed only on CI. In tests the function now returns the override, or an empty list.
This was referenced Nov 2, 2026
5 of 13 tasks
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
Two reactor tests fail on a Mac that is in use, and pass on CI:
named_pin_reload_moves_immediately_without_growing_catalogempty_active_space_membership_during_wake_race_does_not_blank_known_active_windowsWith no override set,
try_space_window_list_for_connectioncallsSLSCopyWindowsWithOptionsAndTagsin tests too. The tests use Space ids 1 and2, and on a desktop Mac Space 1 is the real first desktop, so the query returns
the machine's own windows instead of the test's. The synthetic
windows are missing from that list and are marked hidden. In the named pin
test, the window's first move goes through; the window is then
Hidden,can_place_windowrefuses the second move, and no pre-layout frame write isproduced.
Reproduce
On a Mac with windows open on its first desktop:
It fails on
main(adca720), which passed CI. Overriding the window listwith an empty one makes it pass.
Fix
In tests, the function returns the override, or an empty list, and never asks
the WindowServer. Tests that need a window list already set one.
Testing
cargo test --libonmain: 884 passed, 2 failed (the two above). Withthis commit: 886 passed.
cargo +nightly fmt --all --check.