JDK-8296283 : JUnit5 tests using Params API fails to compile
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: jfx20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-11-03
  • Updated: 2024-05-14
  • Resolved: 2022-11-08
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.
JDK 8 Other
8u431Fixed jfx20Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
Tests using the JUnit 5 params API fails to compile due to missing dependencies. 
------------
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

Class JUnit5Test {

    @ValueSource(doubles = { 1.0, 2.0, 3.0 })
    @ParameterizedTest
    void aTest(double value) {
    }
}
------------
This was uncovered when running the test added in a PR in commit #1+#2: https://github.com/openjdk/jfx/pull/910

The test failed to compile on local mac machine but passed on GHA.
Error:
error: package org.junit.jupiter.params does not exist
error: package org.junit.jupiter.params.provider does not exist
error: cannot find symbol @ValueSource
error: cannot find symbol @ParameterizedTest
Comments
Changeset: b08f1359 Author: Ambarish Rapte <arapte@openjdk.org> Date: 2022-11-08 06:03:51 +0000 URL: https://git.openjdk.org/jfx/commit/b08f1359902882ba97cfdbae64280d1bf10179e3
08-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jfx/pull/939 Date: 2022-11-07 13:11:27 +0000
07-11-2022

NOTE: this blocks the fixes for JDK-8295078 and JDK-8296330 since the PRs for those bugs use the JUnit 5 Params API
04-11-2022