RFR 9: 8146012: CleanerTest fails: Cleanable should have been freed

Chris Hegarty chris.hegarty at oracle.com
Tue Dec 22 17:01:08 UTC 2015


Hi Roger,

On 22 Dec 2015, at 16:35, Roger Riggs <Roger.Riggs at oracle.com> wrote:

> Please review improvements to the CleanerTest to improve the reliability of the test.
> 
> Webrev:
>  http://cr.openjdk.java.net/~rriggs/webrev-cleanertest-8146012/


The use of WhiteBox should make the test more reliable ( rather than relying
on generating garbage ).

Is @library /lib/testlibrary  necessary? I don’t see any usage of types from it.

Is '-Xbootclasspath/a:.’ necessary? Is this for WhiteBox, or the test itself? I
don’t see why it is necessary.

Moving from a varargs of Semaphore to just a single Semaphore does simplify
the code, since it is always called with a single Semaphore.

The new checkCleaned does not enforce availablePermits == 1, just that a permit
is available. Should it assert 1 ?

-Chris.

> Issue:
>   https://bugs.openjdk.java.net/browse/JDK-8146012
> 
> Thanks, Roger




More information about the core-libs-dev mailing list