RFR: 8200102: NativeLibraryTest.java fails intermittently, unloaded count is not same as expected

Mandy Chung mchung at openjdk.java.net
Fri Dec 4 19:54:11 UTC 2020


On Fri, 4 Dec 2020 18:23:55 GMT, Brent Christian <bchristi 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.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1630


More information about the core-libs-dev mailing list