JDK-8289993 : Tests should not rely on specific JAR file names
  • Type: Sub-task
  • Component: core-libs
  • Priority: P4
  • Status: Closed
  • Resolution: Other
  • Submitted: 2022-07-08
  • Updated: 2022-09-26
  • Resolved: 2022-08-13
Description
There are tests that rely on specific JAR file names being present at run-time, which they don't control, which are normally provided by jtreg's binary image. Examples for such JAR files names are:

- junit.jar
- hamcrest.jar
- testng.jar

These tests expect those specific JAR files being present in:

- jtreg's lib directory
- the value returned by System.getProperty("java.class.path")

Here's an initial list of tests known to rely on specific JAR file names:

- https://github.com/openjdk/jdk/blob/master/test/jdk/tools/jpackage/junit/junit.java
- https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java



Comments
Separated into component-specific issues.
13-08-2022

Superseded by - https://bugs.openjdk.org/browse/JDK-8292315 (hotspot) - https://bugs.openjdk.org/browse/JDK-8292316 (jpackage)
13-08-2022