Skip to content

Fix intermittent test_window_state_change failure on macOS x86-64 - #4601

Merged
freakboy3742 merged 2 commits into
beeware:mainfrom
TensorDevLJ:fix-3897-window-state-flakiness
Jul 27, 2026
Merged

Fix intermittent test_window_state_change failure on macOS x86-64#4601
freakboy3742 merged 2 commits into
beeware:mainfrom
TensorDevLJ:fix-3897-window-state-flakiness

Conversation

@TensorDevLJ

@TensorDevLJ TensorDevLJ commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #3897.

Summary

Fix an intermittent macOS x86-64 failure in test_window_state_change by waiting for the window size to stabilize before considering a state transition complete.

Also fix the timeout path in WindowProbe.wait_for_window() so it correctly raises on timeout.

This change only affects the Cocoa test probe and does not modify the production window-state implementation.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR - that definitely sounds like a plausible analysis; I'll poke the CI task a few times and see if I can reproduce (... or not reproduce) the problem.

On a minor style note: Please direct your AI agent to be more terse. The detail you've provided is helpful in the PR comment; it's less helpful to have a dozen lines of explanation in code.

Similarly, there's no need to describe your testing regimen in the PR comment. We have CI, and a strict coverage requirement. Unless there's extraordinary circumstances, the testing regimen is "pass CI". There's no need to tell us how you ran CI - that's documented as part of the development configuration.

Comment thread cocoa/tests_backend/window.py Outdated
Comment thread cocoa/tests_backend/window.py Outdated

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-run the test suite 10 times on macOS-x86-64, and other than a handful of attempts last night where Github decided it didn't want to download files, they've all succeeded - so I'm going to call this successful. Thanks for the PR!

@freakboy3742
freakboy3742 merged commit e81cec8 into beeware:main Jul 27, 2026
929 of 941 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent failure in macOS x86-64 test_window_state_change

2 participants