RFR: 8274274: Update JavaFX test framework to JUnit 5 [v2]

Kevin Rushforth kcr at openjdk.java.net
Fri Sep 24 20:53:55 UTC 2021


On Fri, 24 Sep 2021 20:41:19 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> I've added JUnit 5 as a test dependency and made sure that the JUnit 4 tests still work.  Also added a single JUnit 5 tests, and confirmed it works.
>> 
>> I've updated the Eclipse project file for the base module only.
>
> John Hendrikx has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.

As mentioned in JBS, any new third-party libraries require prior third-party license approval. And we will need to work with you on sponsoring this (as you can't contribute any third-party code under the OCA).

Speaking of which, there are more libraries added to `gradle-verification.xml` than I would expect. Each one will need third-party approval, if they are required. Since this is for internal use (build / test only) and not something we redistribute, that makes it easier, although it still depends on the license for each piece.

Finally, we have some closed tests that we need to ensure aren't impacted by this, so that's one more area we need to coordinate.

We can take a look, but it won't be right away. Can you also start a thread on openjfx-dev? I'd like to gauge the level of interest in enabling JUnit 5 for new tests.

Btw, I think this should be moved to a Draft PR until the third-party issues are resolved (including any needed approvals).

gradle/verification-metadata.xml line 121:

> 119:             <sha256 value="569b6977ee4603c965c1c46c3058fa6e969291b0160eb6964dd092cd89eadd94" origin="Generated by Gradle"/>
> 120:          </artifact>
> 121:       </component>

Why the dependency on junit 4.13.2?

gradle/verification-metadata.xml line 247:

> 245:             <sha256 value="e08028131375b357d1d28734e9a4fb4216da84b240641cb3ef7e7c7d628223fc" origin="Generated by Gradle"/>
> 246:          </artifact>
> 247:       </component>

Is `apiguardian` actually required in order to support JUnit 5? If not, this should be reverted. If so, that's another third-party dependency we would need to get approval for.

gradle/verification-metadata.xml line 273:

> 271:       <component group="org.hamcrest" name="hamcrest-core" version="1.3">
> 272:          <artifact name="hamcrest-core-1.3.jar">
> 273:             <sha256 value="66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9" origin="Generated by Gradle"/>

Is `hamcrest` actually required in order to support JUnit 5? If not, this should be reverted. If so, that's another third-party dependency we would need to get approval for.

gradle/verification-metadata.xml line 345:

> 343:             <sha256 value="a96e671816c1ff8803bdec74c9241f025bdfb277da5d2b4ee02266405936f994" origin="Generated by Gradle"/>
> 344:          </artifact>
> 345:       </component>

Is `opentest4j` actually required in order to support JUnit 5? If not, this should be reverted. If so, that's another third-party dependency we would need to get approval for.

modules/javafx.base/src/test/java/test/JUnit5Test.java line 1:

> 1: package test;

This needs a copyright header block.

-------------

Changes requested by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/633


More information about the openjfx-dev mailing list