RFR: 8200102: NativeLibraryTest.java fails intermittently, unloaded count is not same as expected
Brent Christian
bchristi at openjdk.java.net
Fri Dec 4 20:47:12 UTC 2020
On Fri, 4 Dec 2020 19:51:54 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Please review this fix for the intermittently-failing java/lang/ClassLoader/nativeLibrary/NativeLibraryTest.java.
>>
>> The change replaces System.gc()+sleep() with the more robust gcAwait() mechanic used elsewhere in the test base, [as pointed out by Martin](https://bugs.openjdk.java.net/browse/JDK-8200102?focusedCommentId=14382648&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14382648)(thanks!).
>>
>> The new version of the test passes 100 times out of 100 on the test farm.
>
> Alternatively, you can simply use `test/libjdk/test/lib/util/ForceGC` in the testlibrary.
Yes, I think that's a better plan, Mandy. Thanks. I'll update the fix.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1630
More information about the core-libs-dev
mailing list