RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v7]
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Wed Jun 15 17:32:43 UTC 2022
On Mon, 13 Jun 2022 22:21:18 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> test/lib/jdk/test/lib/util/ForceGC.java line 44:
>>
>>> 42: */
>>> 43: public static boolean wait(BooleanSupplier booleanSupplier) {
>>> 44: return wait(booleanSupplier, 10000L);
>>
>> For the max waiting time, instead of a fixed value I strongly recommend choosing some base waiting time, say 1 second, and scaling it by the jtreg timeout factor.
>
> I also have similar feedback. The timeout factor can be found in the `test.timeout.factor` system property, if present. When running tests with -Xcomp in a fastdebug build, the timeout factor is currently configured to 10. Setting the base waiting time to 1 second seems reasonable.
Good point! I changed to use 1 second as the base waiting time. I was not very sure if 1 second is big enough for the GC cleanup, but the testing result on my laptop and VMs, which are super faster, looks good to me. Please help to check mach5 result.
-------------
PR: https://git.openjdk.org/jdk/pull/8979
More information about the security-dev
mailing list