RFR: JDK-8287671: Adjust ForceGC to invoke System::gc fewer times for negative case

Mandy Chung mchung at openjdk.java.net
Mon Jun 6 20:55:01 UTC 2022


On Fri, 3 Jun 2022 18:05:52 GMT, Mandy Chung <mchung at openjdk.org> wrote:

> This reapplies JDK-8287384 and adjust the number of GCs for negative case, i.e. the condition is never met that is used to verify a reference is not GC'ed.

JDK-8287384 affects the tests using ForceGC for negative cases only.  It will return with a fewer GC cycles of a shortened wait time between each cycle.  It will be okay since a strongly reachable reference will never be GC'ed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/9021


More information about the core-libs-dev mailing list