On Fri, 22 Jul 2022 10:46:57 GMT, Roman Kennke <rken...@openjdk.org> wrote:

> TBH, not certain how GC policies play into that, and how well WB is supported 
> in each GC. Might be worth trying?
> Other that that, how does removinch System.gc() help make the test more 
> reliable?

When you call `System.gc()` on some collectors, they blow out the weak 
references, which includes the cache in question. The assert then fails, 
thinking there was no reason to clear the cache. That is, the assert assumes 
the "memory pressure" is the only way the cache would be dropped, which is 
evidently not true.

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

PR: https://git.openjdk.org/jdk/pull/9533

Reply via email to