RFR: 7903373: Add ability to customize test execution using main wrapper plugin [v17]
Jonathan Gibbons
jjg at openjdk.org
Fri Feb 24 23:33:37 UTC 2023
On Thu, 16 Feb 2023 21:51:00 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> The fix adds support of a plugin that customizes test execution.
>
> Leonid Mesnik has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits:
>
> - merge
> - CHANGELOG.md updated
> - Renamed TestThreadFactoryProvider.java
> - fixed i28n
> - Updated plugin to implement standard ThreadFactory.
> - removed spaces
> - updated docs and copyrights
> - Added new file.
> - Renamed MainWrapper to TestThreadFactory.
> - removed DriverTest.java
> - ... and 49 more: https://git.openjdk.org/jtreg/compare/2f5f2693...f4e9cc63
src/share/classes/com/sun/javatest/regtest/agent/TestThreadFactoryHelper.java line 68:
> 66: }
> 67: loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), loader);
> 68: }
In the `othervm` case, this code will presumably just be called once, but in the `agentvm` case, won't it be called once per test, and since the class loader is never closed, (see [URLCLassLoader.close](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/URLClassLoader.html#close())) won't that lead to a leak of any resources that might be involved ... especially any zip/jar files that might be opened?
Is it not worth trying to cache and reuse the loader?
-------------
PR: https://git.openjdk.org/jtreg/pull/136
More information about the jtreg-dev
mailing list