RFR: 8262080: vmTestbase/nsk/jdi/Event/request/request001/TestDescription.java failed with "ERROR: new event is not ThreadStartEvent" [v3]
Chris Plummer
cjplummer at openjdk.java.net
Thu Mar 11 22:55:10 UTC 2021
On Thu, 11 Mar 2021 21:20:31 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> The fix updates the test to skip ThreadStartEvent/ThreadDeathEvent from other threads
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>
> used pattern matching for instanceof to simplify the code
test/hotspot/jtreg/vmTestbase/nsk/share/jdi/JDIBase.java line 178:
> 176: } else {
> 177: // not ThreadStartEvent nor ThreadDeathEvent
> 178: gotDesiredEvent = true;
Do you think it would be better if you only set `gotDesiredEvent = true` if the event came in on the named thread? If the event came in on another thread, it seems it should be ignored. If it came in on the named thread, then it is probably an error since the test is expecting ThreadStart or ThreadDeath, so in that case return and let the caller complain.
test/hotspot/jtreg/vmTestbase/nsk/share/jdi/JDIBase.java line 158:
> 156: // When ThreadStartRequest and/or ThreadDeathRequest are enabled, we can get the events from system threads
> 157: // unexpected for tests.
> 158: // The method skips ThreadStartEvent/ThreadDeathEvent events for all threads except the expected one.
Can you clean up the line lengths so they are close to being even.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2927
More information about the serviceability-dev
mailing list