RFR: 8294881: test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose003/TestDescription.java fails [v2]

Chris Plummer cjplummer at openjdk.org
Thu Oct 27 14:47:27 UTC 2022


On Thu, 27 Oct 2022 04:45:05 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   All dispose tests fixed.
>
> test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002a.java line 130:
> 
>> 128:                              instruction = pipe.readln();
>> 129:                              if (instruction.equals("check_done")) {
>> 130:                                  if (Utils.isAlive(test_thread)) {
> 
> We also have `jdk.test.lib.Utils` being referenced as `Utils` in the main test. Maybe `JDIUtils` would be better.
> 
> Also, `isAlive` is a bit generic sounding. It would be nice if the name conveyed the relationship to waiting after a dispose. Maybe `isAliveAfterVMDispose`. At least then the user knows there's something special about the "is alive" check being made.

Actually `isAliveAfterVMDispose` conveys the wrong message. The idea is to give the `VM.dispose()` a chance to happen. Maybe `isAlive` should just better document why it waits.

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

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


More information about the serviceability-dev mailing list