RFR: 8289919: [test] LoadLibraryUnloadTest.java failed with "Failed to unload native library" [v2]

Roger Riggs rriggs at openjdk.org
Thu Jul 14 15:07:04 UTC 2022


On Wed, 13 Jul 2022 20:39:53 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Cleanup waiting for library unload
>
> test/jdk/java/lang/ClassLoader/loadLibraryUnload/LoadLibraryUnload.java line 168:
> 
>> 166:         for (int i = 0; i < LOADER_COUNT; i++) {
>> 167:             System.gc();
>> 168:             var res = refQueue.remove();
> 
> This should block until one becomes available or `InterruptedException` gets thrown.   So `res` would never be null?

The test for null was leftover from a previous version that used `remove(timeout)`.
I'll restore the timeout; that version will produce a better message than just relying on jtreg to timeout the entire test with a generic message.

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

PR: https://git.openjdk.org/jdk/pull/9474


More information about the core-libs-dev mailing list