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

Reply via email to