On Thu, 21 Mar 2024 22:25:23 GMT, Alex Menkov <amen...@openjdk.org> wrote:

> The change fixes 3 nsk JDI tests.
> Root cause in all 3 tests is the same - the tests requests JDI event with 
> SUSPEND_ALL policy, but event handler thread stops handle incoming event and 
> this causes debuggee to hang (suspended by JDI event).
> 
> All 3 tests are updated to exit event handler thread after getting 
> VMDeathEvent or VMDisconnectEvent (and resume debuggee after any other 
> events).
> ClassPrepareEvent tests need to wait some time to allow handle all expected 
> events before terminate the debuggee. The logic was implemented by using 
> CountDownLatch.
> 
> All tests are passed with "--test-repeat 20"

Looks good. Just a minor suggestion.

test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/referenceType/refType001.java
 line 276:

> 274:             try {
> 275:                 if (!eventsReceivedLatch.await(eventTimeout, 
> TimeUnit.MILLISECONDS)) {
> 276:                     log.complain("FAILURE 20: Timeout for waiting event 
> was exceeded");

Should it be "Timeout waiting for all events was exceeded" or maybe "Timeout 
while waiting for all events"? Same thing for thread001.java.

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18442#pullrequestreview-1953909318
PR Review Comment: https://git.openjdk.org/jdk/pull/18442#discussion_r1535025663

Reply via email to