RFR: 8291651: CleanerTest.java fails with "Cleanable was cleaned"

Daniel Fuchs dfuchs at openjdk.org
Mon Aug 29 17:17:44 UTC 2022


On Fri, 26 Aug 2022 19:09:45 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> CleanerTest is failing intermittently on Aarch64, with -Xcomp, and using a VirtualThread for the Cleaner in the test.
> The extensively relies on references processing and invokes GC on a very short cycle.
> The existing 10ms delay between GC requests is too short for the changes to reference states to be reliably visible.
> 
> The delay between gc requests is extended to 200ms and the tests pass reliably.
> There are small improvements in diagnostic messages and cleanup of unused imports.

test/jdk/java/lang/ref/CleanerTest.java line 569:

> 567:         obj = null;
> 568:         checkCleaned(s.getSemaphore(), true,
> 569:                 "Object was cleaned using CleanerFactory.cleaner():");

So the message in case of failure for this case will now be?

Should have been run: Object was cleaned using CleanerFactory.cleaner():

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

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


More information about the core-libs-dev mailing list