RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded [v2]
Mandy Chung
mchung at openjdk.org
Wed Feb 8 23:17:20 UTC 2023
> `test/jdk/java/lang/invoke/defineHiddenClass/UnloadingTest.java` defines hidden classes and verify cases that a class loader is not unloaded using `ForceGC::wait`. ForceGC::wait` defaults the timeout to 1000ms * jtreg timeout factor, which is designed to work well to expect an object being reclaimed, i.e. the boolean supplier returns true. On the other hand, if the boolean supplier never returns true, the method returns after it timeouts which may be long depending on the timeout factor.
>
> This PR adds a variant of `ForceGC::wait` to take a timeout parameter and tests can specify the timeout to reduce the time it takes testing a strongly reachable object not being reclaimed.
Mandy Chung has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge branch 'master' of https://github.com/openjdk/jdk into JDK-8301704
- Rename the new method to waitFor
- JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a strongly reachable object not being unloaded
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12392/files
- new: https://git.openjdk.org/jdk/pull/12392/files/6c7d12c7..f67b60ad
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12392&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12392&range=00-01
Stats: 11925 lines in 371 files changed: 7936 ins; 1454 del; 2535 mod
Patch: https://git.openjdk.org/jdk/pull/12392.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12392/head:pull/12392
PR: https://git.openjdk.org/jdk/pull/12392
More information about the core-libs-dev
mailing list