Skip to content

Stabilize focus handling in HoverTest - #4241

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:fix/hovertest-focus-flake
Aug 13, 2026
Merged

Stabilize focus handling in HoverTest#4241
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:fix/hovertest-focus-flake

Conversation

@vogella

@vogella vogella commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

HoverTest requested focus for the editor exactly once per attempt and then hard-asserted that the text widget owns it. On a loaded CI machine the window manager can take activation away in exactly that window, which is where the recurring editor does not have focus failures come from, even though the retry loop right next to the assertion was meant to cover such hiccups.

Focus acquisition now lives in a helper that re-activates the window and re-requests focus a few times, and failing to get focus continues the existing retry loop instead of aborting the test. The assertion is kept for the case that focus is never obtained, so a genuinely stuck window manager still fails with the same message rather than being masked. Nothing is added to the happy path: when focus works on the first request the test runs exactly as fast as before.

See #1808.

HoverTest requested focus for the editor exactly once per attempt and then
hard-asserted that the text widget owns it. Under a loaded CI machine the
window manager can take activation away in that window, so the test failed
with "editor does not have focus" even though the retry loop right next to
it was meant to cover such hiccups.

Focus acquisition moves into a helper that re-activates the window and
re-requests focus a few times, and a failure to get focus now continues the
existing retry loop instead of aborting the test. The assertion is kept for
the case that focus is never obtained, so a genuinely stuck window manager
still fails with the same message.

See eclipse-platform#1808
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files     858 suites   54m 5s ⏱️
 8 157 tests  7 914 ✅ 243 💤 0 ❌
20 373 runs  19 719 ✅ 654 💤 0 ❌

Results for commit 494bc90.

@vogella
vogella merged commit fdcfd9a into eclipse-platform:master Aug 13, 2026
18 checks passed
@vogella
vogella deleted the fix/hovertest-focus-flake branch August 13, 2026 11:12
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.

1 participant