RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded
Roger Riggs
rriggs at openjdk.org
Wed Feb 8 20:45:43 UTC 2023
On Wed, 8 Feb 2023 20:30:13 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> test/lib/jdk/test/lib/util/ForceGC.java line 73:
>>
>>> 71: * if did not complete after the specified waiting time.
>>> 72: */
>>> 73: public static boolean wait(BooleanSupplier booleanSupplier, long timeout) {
>>
>> Can the method name be changed to make it clear the timeout is not scaled by the TIMEOUT factor.
>> (It would have been better if the original method name mentioned the timeout factor).
>> How about, `waitNoMoreThan`.
>
> what about `waitFor`?
>
> I also considered renaming the original method to something else to indicate that the timeout is scaled with jtreg timeout factor. Now `wait(BooleanSupplier)` is equivalent to `wait` with timeout = 1000L * TIMEOUT_FACTOR) and the javadoc states the timeout, which seems okay to me.
`waitFor` is fine, renaming the original method (and its uses) makes it higher overhead.
-------------
PR: https://git.openjdk.org/jdk/pull/12392
More information about the core-libs-dev
mailing list