Bug 567552 - [JUnit5] test launch does not add jdt.junit5.runtime from host
Summary: [JUnit5] test launch does not add jdt.junit5.runtime from host
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Julian Honnen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-02 10:33 EDT by Julian Honnen CLA
Modified: 2022-03-15 03:55 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Honnen CLA 2020-10-02 10:33:02 EDT
The mechanism to add required junit runtime bundles that are missing the target platform hasn't been updated for JUnit 5.

Reproduction: 
* create a default target platform and deselect all org.eclipse.*.junit*
  bundles
* Launch a JUnit 5 test

startup fails:
!MESSAGE Application error
!STACK 1
java.lang.IllegalArgumentException: Bundle "org.eclipse.jdt.junit5.runtime" not found. Possible causes include missing dependencies, too restrictive version ranges, or a non-matching required execution environment.


org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate.getRequiredPlugins should return the org.eclipse.jdt.junit5.runtime bundle and its dependencies for JUnit 5 test runners.
Comment 1 Eclipse Genie CLA 2021-11-04 08:50:42 EDT
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/187311
Comment 2 Lars Vogel CLA 2021-11-05 04:10:54 EDT
Unfortunately Eclipse SDK tests cannot use Junit 5, see Bug 531057.
Comment 5 Alexander Kurtakov CLA 2022-03-15 02:09:14 EDT
I'll take care of it.
Comment 6 Eclipse Genie CLA 2022-03-15 02:13:25 EDT
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/191886
Comment 8 Hannes Wellmann CLA 2022-03-15 03:30:20 EDT
(In reply to Alexander Kurtakov from comment #5)
> I'll take care of it.

Thank you!

I's a pity, but I have to admit that I'm too used to warnings in the PDE code base (other Eclipse plug-ins are similar) so that I just oversaw this.
We should consider to make such warnings that are easy to fix errors (although this can become inflationary too) and ideally let the build fail in such cases.

Alternatively once PDE has moved to GitHub the QualityGate results could be posted to a PR similar like it is done for Tycho's Unit-Test results:
https://github.com/eclipse/tycho/pull/752#issuecomment-1064920890

This would make it harder to oversee new warnings because one does not have to go to a new page.

Since Alexander's change is submitted I'm setting this to resolved again.
Comment 9 Alexander Kurtakov CLA 2022-03-15 03:39:34 EDT
(In reply to Hannes Wellmann from comment #8)
> (In reply to Alexander Kurtakov from comment #5)
> > I'll take care of it.
> 
> Thank you!
> 
> I's a pity, but I have to admit that I'm too used to warnings in the PDE
> code base (other Eclipse plug-ins are similar) so that I just oversaw this.
> We should consider to make such warnings that are easy to fix errors
> (although this can become inflationary too) and ideally let the build fail
> in such cases.

Sadly, this is true. I found it most productive to enable save actions to fix imports, casts and etc. But every bit here helps. We need a critical group of people that strive for that so we can make more things errors, as long as we have many we can't make them errors as it will block any development.

> 
> Alternatively once PDE has moved to GitHub the QualityGate results could be
> posted to a PR similar like it is done for Tycho's Unit-Test results:
> https://github.com/eclipse/tycho/pull/752#issuecomment-1064920890

One step after the other. Let's first clean up gerrit queue so migration to github is feasible task. After that opportunites are many. We even discussed with Mickael the possibility to have a bot that bumps the version when needed but that's for the "bright future" (tm) .

> 
> This would make it harder to oversee new warnings because one does not have
> to go to a new page.
> 
> Since Alexander's change is submitted I'm setting this to resolved again.
Comment 10 Hannes Wellmann CLA 2022-03-15 03:55:50 EDT
(In reply to Alexander Kurtakov from comment #9)
> 
> Sadly, this is true. I found it most productive to enable save actions to
> fix imports, casts and etc. But every bit here helps. We need a critical
> group of people that strive for that so we can make more things errors, as
> long as we have many we can't make them errors as it will block any
> development.

I would really like to activate save actions but the code has to be clean up first, otherwise I end up with many unrelated changes or would spend a lot of time sorting them out.
But I plan to dedicate some changes to automatic and manual clean ups (after the migration to GitHub). I already have many fragmented commits locally with clean-ups I encountered during other work, but I want to group them in a reasonable way.

> 
> > 
> > Alternatively once PDE has moved to GitHub the QualityGate results could be
> > posted to a PR similar like it is done for Tycho's Unit-Test results:
> > https://github.com/eclipse/tycho/pull/752#issuecomment-1064920890
> 
> One step after the other. Let's first clean up gerrit queue so migration to
> github is feasible task. After that opportunites are many. We even discussed
> with Mickael the possibility to have a bot that bumps the version when
> needed but that's for the "bright future" (tm) .
> 

Sure :)  Sounds good, I'm looking forward to it!