Skip to content

Attempt to stabilize MavenTargetDependencyEditorTest.testAddMavenLocation - #2267

Merged
laeubi merged 1 commit into
eclipse-m2e:mainfrom
RoiSoleil:fix-target-editor-test
Oct 8, 2026
Merged

laeubi merged 1 commit into
eclipse-m2e:mainfrom
RoiSoleil:fix-target-editor-test

Conversation

@RoiSoleil

Copy link
Copy Markdown
Contributor

Split out of #2265, as requested there.

MavenTargetDependencyEditorTest.testAddMavenLocation randomly fails with:

expected:<[]> but was:<[org.apache.commons]>

i.e. the value typed into the first cell of the new row is lost.

I could not reproduce this one locally, so this is an attempt based on reading the code:

  • The dialog updates its table asynchronously (side effects) when its model changes, so the test may edit a cell while the update triggered by "Add" is still pending.
  • The test looked for the cell editor with robot.text(0), which silently returns the location label of the wizard when no cell editor is active.

The test now processes the pending UI events before editing a cell, and looks for the cell editor in the table only, so if the editor cannot be activated it fails with a clear message instead of typing into another field.

Testing

MavenTargetDependencyEditorTest passes locally on Linux (9/9, three runs in a row) and passed on the three platforms and on Jenkins as part of #2265. Since the failure is random, the real check is whether it stops showing up on CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SscofYwGFw413Xrn8R2AUq

…tion

The test sometimes fails because the value typed into the first cell of
the new row is lost:

  expected:<[<required>]> but was:<[org.apache.commons]>

The dialog updates its table asynchronously when its model changes, so
the test may edit a cell while the update triggered by "Add" is still
pending. It also looked for the cell editor among all the text widgets
of the dialog, and so silently typed into the location label if no
cell editor was active.

Process the pending UI events before a cell is edited, and look for the
cell editor in the table only, so that the test fails with a clear
message if the editor could not be activated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SscofYwGFw413Xrn8R2AUq
@RoiSoleil
RoiSoleil force-pushed the fix-target-editor-test branch from 4dfc93c to 3182fe6 Compare October 8, 2026 04:42
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Test Results

  345 files  ±0    345 suites  ±0   1h 24m 14s ⏱️ + 2m 22s
  726 tests ±0    709 ✅ +1  16 💤 ±0  0 ❌  - 1  1 🔥 ±0 
2 178 runs  ±0  2 129 ✅ +1  48 💤 ±0  0 ❌  - 1  1 🔥 ±0 

For more details on these errors, see this check.

Results for commit 3182fe6. ± Comparison against base commit 8bc713d.

@laeubi
laeubi merged commit aef6ef6 into eclipse-m2e:main Oct 8, 2026
11 of 15 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.

2 participants