You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This implicitly caches an underlying JAR file for the current VM, if the junit-platform.properties file is located in a JAR file. On Windows, that means a lock is held by the VM until its associated reference is garbage collected.
When, for example, testing the launcher framework within a test method that prepares a custom class-path or module-path with generated JAR files in a temporary directory, that temporary directory can't be deleted on Windows, due the lock of the cached JAR file reference.
Deliverables
Use the following code to prevent caching of an underlying JAR file:
Today, the code in the launcher uses the convenient input stream accessor
openStream()
provided by theURL
class:junit5/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfigurationParameters.java
Lines 66 to 68 in efdb9fd
This implicitly caches an underlying JAR file for the current VM, if the
junit-platform.properties
file is located in a JAR file. On Windows, that means a lock is held by the VM until its associated reference is garbage collected.When, for example, testing the launcher framework within a test method that prepares a custom class-path or module-path with generated JAR files in a temporary directory, that temporary directory can't be deleted on Windows, due the lock of the cached JAR file reference.
Deliverables
The text was updated successfully, but these errors were encountered: