On Mon, 7 Dec 2020 19:30:28 GMT, Brent Christian <bchri...@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.
>
> Brent Christian has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains three additional 
> commits since the last revision:
> 
>  - Merge branch 'master' into 8200102
>  - Use existing ForceGC class in the test lib
>  - Add gcAwait() mechanism

Looks good to me (with trivial nits).

test/jdk/java/lang/ClassLoader/nativeLibrary/NativeLibraryTest.java line 2:

> 1: /*
> 2:  * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.

Missin 2017?

test/jdk/java/lang/ClassLoader/nativeLibrary/NativeLibraryTest.java line 72:

> 70:             if (!gc.await(() -> finalCount == unloadedCount)) {
> 71:                 throw new RuntimeException("Expected unloaded=" + count +
> 72:                         " but got=" + unloadedCount);

Could be left unchanged.

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

Marked as reviewed by naoto (Reviewer).

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

Reply via email to