8335134: Test com/sun/jdi/BreakpointOnClassPrepare.java timeout

Reviewed-by: kevinw, coleenp
This commit is contained in:
Chris Plummer 2024-06-27 22:20:14 +00:00
parent 3b1ca98642
commit 4e8cbf884a

View File

@ -104,7 +104,15 @@ public class BreakpointOnClassPrepare extends TestScaffold {
public void breakpointReached(BreakpointEvent event) {
bkptCount++;
System.out.println("Got BreakpointEvent: " + bkptCount + " for thread " + event.thread());
String threadInfo;
try {
threadInfo = event.thread().toString();
} catch (ObjectCollectedException e) {
// It's possible the Thread already terminated and was collected
// if the SUSPEND_NONE policy was used.
threadInfo = "(thread collected)";
}
System.out.println("Got BreakpointEvent: " + bkptCount + " for thread " + threadInfo);
}
public void vmDisconnected(VMDisconnectEvent event) {