> Can I get a review of this test-only cleanup/speedup PR which modernizes the > test `RemoveJar.java`. > > This test attempts a variety of class loading scenarios on a URLClassLoader > and verifies that when the loader is closed, it has released its JAR file > (such that it may be deleted on Windows). > > Changes in this PR include: > > * Converting the test to JUnit 5 > * Making it `@Parameterized` instead of using multiple jtreg runs > * Producing the sample class file using the ClassFile API instead calling out > to `javac` via ToolProvider > * Packaging the JAR using `JarOutputStream` instead of calling out to the > `jar` tool. > * Adding some code and method comments to support understading of what this > test does and why > > A nice benefit of this change is that it speeds up the runtime from ~15 > seconds to ~1 second on my laptop. > > Unfortunately, this test relies on Windows to fail, that is something I plan > to look into separately. > > Verification: GHA tests pending. (No local Windows dev environment)
Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/java/net/URLClassLoader/RemoveJar.java Adjust whitespace Co-authored-by: Andrey Turbanov <turban...@gmail.com> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22319/files - new: https://git.openjdk.org/jdk/pull/22319/files/5d0be877..bd6c6dbb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22319&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22319&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/22319.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22319/head:pull/22319 PR: https://git.openjdk.org/jdk/pull/22319