RFR: 8346929: runtime/ClassUnload/DictionaryDependsTest.java fails with "Test failed: should be unloaded"

Calvin Cheung ccheung at openjdk.org
Wed Jan 8 19:20:34 UTC 2025


On Wed, 8 Jan 2025 16:59:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> Adopt the new ClassUnloadCommon.triggerUnloading API to make the unloading tests more reliable.
> Tested with tier1 on all platforms.

Looks good overall. Spotted couple of minor issues.

test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes/HelloUnload.java line 107:

> 105:             Set<String> aliveClasses = ClassUnloadCommon.triggerUnloading(List.of(className));
> 106:             System.out.println("Is CustomLoadee alive? " + wb.isClassAlive(className));
> 107:             ClassUnloadCommon.failIf(!aliveClasses.isEmpty(), "should have bee unloaded: " + aliveClasses);

typo: bee -> been

test/hotspot/jtreg/runtime/logging/ClassLoadUnloadTest.java line 45:

> 43: import java.util.Collections;
> 44: import java.util.List;
> 45: import java.util.Set;

This seems to be unused. Or perhaps should check the return `Set<String>` from the call to `ClassUnloadCommon.triggerUnloading` below as is being done in other tests?

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

Changes requested by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22974#pullrequestreview-2537993333
PR Review Comment: https://git.openjdk.org/jdk/pull/22974#discussion_r1907681785
PR Review Comment: https://git.openjdk.org/jdk/pull/22974#discussion_r1907685786


More information about the hotspot-runtime-dev mailing list