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

Backport-of: 4e8cbf884a
This commit is contained in:
Andrew Lu
2024-08-01 02:17:46 +00:00
committed by Vitaly Provodin
parent 8e7498e315
commit 85a0663d45

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) {