RFR 9: 8146773 java/lang/ref/CleanerTest.java CleanerTest.testRefSubtypes() fails
daniel.fuchs at oracle.com
Mon Feb 1 09:24:31 UTC 2016
Looks good to me - but I'd suggest to call fullGC at least once
before waiting on the semaphore (e.g. add a call to whitebox.fullGC()
when entering checkCleaned() before line 285).
That might maximize the chances that the referred object will be
GC'ed before you start waiting on the semaphore.
Also I wonder whether you should raise the timeout in tryAcquire, 10ms
is not much - and you want to give enough time so that the cleaner's
thread is scheduled and calls the cleanup action...
Maybe you could make that timeout depending on the timeoutFactor
On 29/01/16 19:47, Roger Riggs wrote:
> Please review a fix for two test issues. When run with -Xcomp and other
> switches that change
> GC behavior; the CleanerTest was not giving enough to time to see the
> result of cleaning.
> Also, added an adjustment of the number of cycles by the timeoutFactor.
> 8146773: java/lang/ref/CleanerTest.java CleanerTest.testRefSubtypes() fails
> 8148352: CleanerTest fails: Cleanable should have been freed
> Thanks, Roger
More information about the core-libs-dev