RFR(S): 8068613: Wrong number of objects pending finalization start
Martin Buchholz
martinrb at google.com
Tue Jan 13 15:13:36 UTC 2015
Y'all should import GcFinalization for use as a testing utility.
http://code.google.com/p/guava-libraries/source/browse/guava-testlib/src/com/google/common/testing/GcFinalization.java
On Tue, Jan 13, 2015 at 4:55 AM, Mattias Tobiasson <
mattias.tobiasson at oracle.com> wrote:
> Hi,
> Could I please have a review of this test bug fix.
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8068613
> webrev: http://cr.openjdk.java.net/~ykantser/8068613/webrev.00/ <
> http://cr.openjdk.java.net/%7Eykantser/8068613/webrev.00/>
>
> On line 90 and on line 246 (in the old version) the test does a short wait
> between
> Runtime.getRuntime().runFinalization() and
> MemoryMXBean.getObjectPendingFinalizationCount()
>
> The test expects getObjectPendingFinalizationCount() to return 0,
> but that can fail on really slow servers.
>
> The fix will loop until getObjectPendingFinalizationCount() returns 0,
> or until it gives up after 100 tries.
>
> I have also moved all logging and finalization count verification to a
> function.
> This makes the diff look like everything have been changed, but it is
> mostly
> duplicate logging code that has been removed.
>
> I have tested it on all platforms, except embedded.
>
> Thanks,
> Mattias
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20150113/88fa54d9/attachment.html>
More information about the serviceability-dev
mailing list