Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate RCPTT test for MavenTargetDependencyEditor to SWTBot #1816

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

ptziegler
Copy link
Contributor

In the long run, using RCPTT is probably causing more trouble than it's worth. It therefore makes sense to switch to a more lightweight solution like SWTBot for testing.

@ptziegler
Copy link
Contributor Author

This also has the added benefit of allowing one to execute those tests directly within the Eclipse IDE.

Copy link

github-actions bot commented Aug 27, 2024

Test Results

  321 files  ± 0    321 suites  ±0   26m 42s ⏱️ - 2m 48s
  678 tests + 8    656 ✅ + 7  18 💤 ±0  3 ❌ +1  1 🔥 ±0 
2 034 runs  +24  1 976 ✅ +23  54 💤 ±0  3 ❌ +1  1 🔥 ±0 

For more details on these failures and errors, see this check.

Results for commit fe3dadf. ± Comparison against base commit aa4f825.

This pull request removes 1 and adds 9 tests. Note that renamed tests count towards both.
DependencyEditorTest
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testAddMavenLocation
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testAddMavenLocationWithClipboard
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testColumnSorting
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testEditCellsDirectly
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testInitialButtonState
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testMultiSelection
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testRemoveArtifacts
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testUndoRedo
org.eclipse.m2e.pde.ui.MavenTargetDependencyEditorTest ‑ testUpdateMavenArtifactVersion

♻️ This comment has been updated with latest results.

@HannesWell
Copy link
Contributor

Thank you @ptziegler for this migration, as said I have no idea about this part and trust your assessment.
As long as the tests pass I'm happy with it.
@laeubi or somebody else do you have any special interest in this?

Patrick, could you then revert the change from #1163 regarding the formats of the tycho-p2-director-plugin? In fact the entire formats section can be removed since all values are the default then and with that actually the entire section for the tycho-p2-director-plugin in that pluginsManagement element is obsolete. Could you please remove that entirely in a second commit of this PR?

@ptziegler ptziegler force-pushed the swtbot branch 2 times, most recently from 019b622 to 3e843f3 Compare August 31, 2024 15:48
@ptziegler
Copy link
Contributor Author

ptziegler commented Aug 31, 2024

The instability seems to be gone. I need to make sure that the target platform has been resolved before executing the test. Otherwise the Maven target editor can't be opened reliably/in time.

In fact the entire formats section can be removed since all values are the default then and with that actually the entire section for the tycho-p2-director-plugin in that pluginsManagement element is obsolete

The entry itself needs to stay to specifiy the Tycho version, but the execution block is gone.

2024-08-31T15:25:59.5306983Z [WARNING] Some problems were encountered while building the effective model for org.eclipse.m2e:m2e-ide:eclipse-repository:2.0.0
2024-08-31T15:25:59.5310284Z [WARNING] 'build.plugins.plugin.version' for org.eclipse.tycho:tycho-p2-director-plugin is missing.
2024-08-31T15:25:59.5311392Z [WARNING]
2024-08-31T15:25:59.5312391Z [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

@akurtakov
Copy link
Contributor

Would you please look into failing tests (https://ci.eclipse.org/m2e/job/m2e/job/PR-1816/20/) ? And sorry for the merge commit (I wanted to rebase but misclicked!) please rebase on master and force push.

@ptziegler ptziegler force-pushed the swtbot branch 6 times, most recently from 3cd91c9 to b808127 Compare October 2, 2024 16:53
@ptziegler
Copy link
Contributor Author

ptziegler commented Oct 2, 2024

I think the initial approach of opening the Maven editor via the target-platform editor is just not very reliable... A lot depends on when the dependencies are resolved, which is effectively arbitrary.
I now try to instantiate the Maven editor directly, which should overall be faster and more stable. This of course has the downside that this needs to know the actual classes and is therefore less agnostic.

@ptziegler ptziegler force-pushed the swtbot branch 4 times, most recently from f0f2825 to 4b7dd1a Compare October 2, 2024 19:42
In the long run, using RCPTT is probably causing more trouble than it's
worth. It therefore makes sense to switch to a more lightweight solution
like SWTBot for testing.
The "tar.gz" archive format for Windows was only needed for RCPTT. With
migrating to SWTBot, the default settings can be used.
@ptziegler
Copy link
Contributor Author

All the SWTBot tests completed at least once now... The other failures are very likely unrelated.

@akurtakov
Copy link
Contributor

Thanks for all the work. Merging.

@akurtakov akurtakov merged commit bbb10c7 into eclipse-m2e:master Oct 3, 2024
6 of 8 checks passed
@ptziegler ptziegler deleted the swtbot branch October 3, 2024 08:50
@HannesWell
Copy link
Contributor

Thank you @ptziegler!

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.

3 participants