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

David Holmes dholmes at openjdk.org
Mon Jan 13 04:29:44 UTC 2025


On Thu, 9 Jan 2025 13:30:28 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> test/hotspot/jtreg/runtime/ClassUnload/UnloadInterfaceTest.java line 93:
>> 
>>> 91: 
>>> 92:         // Now unload className. This calls triggerUnloading but we only pass the class we expect to be unloaded
>>> 93:         // otherwise the test will take too long.
>> 
>> Don't understand why this one needs a comment and none of the others do. ?? Also why the "otherwise" part?
>
> I was trying to explain why interfaceName is not in the List.  I could have added it and tested that it's not unloaded but then the test would take too long.  It may be more correct to add it and make triggerUnloading try to unload it and fail to prove it cannot be unloaded.  But like I said in the comment, it would make the test take too long.

So `interfaceName` is not expected to be unloaded so `triggerUnloading` would run the full 2 seconds failing to detect it is unloaded, if it was passed in. But surely you would just use WB to test if a class is still loaded as expected?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22974#discussion_r1912652854


More information about the hotspot-runtime-dev mailing list