8387640: vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java fails intermittently

Reviewed-by: sspitsyn, lmesnik
This commit is contained in:
Chris Plummer 2026-07-15 17:46:57 +00:00
parent 41a188f1d1
commit c4a8cb2349

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -201,7 +201,7 @@ public class thrstartreq001 {
public void run() {
try {
do {
while (true) {
EventSet eventSet = vm.eventQueue().remove(1000);
if (eventSet != null) { // there is not a timeout
EventIterator it = eventSet.eventIterator();
@ -219,11 +219,15 @@ public class thrstartreq001 {
log.display("EventListener: following JDI event occured: "
+ event.toString());
}
if (isConnected) {
eventSet.resume();
}
eventSet.resume();
// Even if isConnected has been set false, we need to continue consuming
// events until there are no more. So do a continue here rather than
// allowing continuing to be conditional on isConnected below.
continue;
}
} while (isConnected);
if (!isConnected)
break;
}
} catch (InterruptedException e) {
tot_res = FAILED;
log.complain("FAILURE in EventListener: caught unexpected "