JDK-8292678 : Openjfx: all projects to use JUnit5 (Eclipse)
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-08-19
  • Updated: 2022-11-29
  • Resolved: 2022-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx20 b03Fixed
Related Reports
Relates :  
Description
just noticed that the controls .classpath is missing an entry for JUnit5 - which are needed f.i. for PR 711 which added new tests using it.

The missing entry seems to be something like (this is added when configuring the build path via ui):

	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
		<attributes>
			<attribute name="test" value="true"/>
		</attributes>
	</classpathentry>

Probably needs to be done for all projects (didn't check, though ..)

edit:
let's update all the projects to use JUnit5
Comments
Changeset: eb8f2fe3 Author: Andy Goryachev <angorya@openjdk.org> Committer: Nir Lisker <nlisker@openjdk.org> Date: 2022-08-30 19:15:16 +0000 URL: https://git.openjdk.org/jfx/commit/eb8f2fe3c97398b202ad8241e6df647dc817636e
30-08-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jfx/pull/883 Date: 2022-08-23 18:38:48 +0000
23-08-2022

You are right - we can use this ticket to update .classpath to use junit5 for all the projects. btw, #711 seem to depend on #876 because of CellBehaviorBase, so it probably makes sense not to view them in isolation.
22-08-2022

thanks for checking, everyone and sry for the mess: I had pulled in the forked PR 711 which didn't have the latest .classpath (Maran doesn't use Eclipse, afaik, so didn't notice). Then filed this before comparing against master - so yes, everything compiles just fine. We can either close this (because it's not-an-issue as reported) or take it as a incentive to add JUnit5 to all Eclipse projects, as Kevin suggested. My personal preference would by the latter, because we will hit it the moment anybody adds JUnit5 tests. But at the end of the day, I'm fine with any.
22-08-2022

all projects compile ok in eclipse after JDK-8290473. yes, some projects have JUnit4, some JUnit5, and some (e.g. base) a mixture of 4 and 5, but they all compile. specifically, controls have ``` <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"> <attributes> <attribute name="test" value="true"/> </attributes> </classpathentry> ``` in .classpath. [~fastegal] did you perform the git pull in eclipse or via command line? if the latter, please Refresh the projects, followed by a Project -> Clean and (automatic) Rebuild.
22-08-2022

re-checked Eclipse .classpath against master: - controls has JUnit5 - graphics has JUnit4 - base has both JUnit4/JUnit5 (didn't check the other projects) so no problem with controls and base (after updating my local workspace ;), but probably with graphics
22-08-2022

I don't think there are any tests in graphics that use JUnit5, but since they could be added at any time, it might be a good idea to get ahead of that and update graphics to include it.
22-08-2022

Andy: are you able to run JUnit5-based tests in UI controls?
20-08-2022