Skip to content

Fix flaky testMouseMoveOpensTheToolbarForTheHoveredDiff - #2963

Merged
tobiasmelcher merged 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:fix/issue-2962-toolbar-visibility-test
Sep 23, 2026
Merged

tobiasmelcher merged 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:fix/issue-2962-toolbar-visibility-test

Conversation

@tobiasmelcher

@tobiasmelcher tobiasmelcher commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Tries to fix #2962

The testMouseMoveOpensTheToolbarForTheHoveredDiff test was checking toolbar.getVisible() after a synthetic mouse move. Replace the getVisible() assertion with assertNotSame(toolbarBefore, toolbar) — this verifies that the mouse move caused a new toolbar composite to be created/installed, which is the real invariant the test should enforce.

…iff flakiness

Replace the toolbar.getVisible() assertion with assertNotSame() to verify
that the mouse move created a new toolbar composite. The visibility check
was sensitive to whether the text widget had been painted (layout-dependent),
causing intermittent failures on Java 26.

Fixes eclipse-platform#2962
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    54 files  +  3      54 suites  +3   55m 16s ⏱️ +18s
 4 811 tests ±  0   4 789 ✅ +  1   22 💤 ±0  0 ❌  - 1 
12 324 runs  +261  12 171 ✅ +262  153 💤 ±0  0 ❌  - 1 

Results for commit aa08425. ± Comparison against base commit 6e4cd9b.

@iloveeclipse

Copy link
Copy Markdown
Member

@tobiasmelcher : the test doesn't fail for me locally neither with nor without change :-)
Since I don't know the code under test and the test itself, I trust you that it is the right thing :-)

@iloveeclipse

Copy link
Copy Markdown
Member

Feel free to merge if the build will be green.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The identity assertion conflicts with valid toolbar reuse and remains dependent on prior mouse activity.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates a flaky unified-diff toolbar hover test.

Changes:

  • Replaces toolbar visibility checking with composite identity checking.
  • Captures the toolbar instance before synthetic mouse movement.
File Description
UnifiedDiffManagerTest.java Revises the toolbar hover assertion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tobiasmelcher
tobiasmelcher merged commit a439595 into eclipse-platform:master Sep 23, 2026
18 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.

UnifiedDiffManagerTest fails with I20260922-0819

4 participants