mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-06 16:38:36 +00:00
6736461: ThreadMXBean Locks.java fails intermittently
Fixed the test to wait for the right state before calling check thread information. Reviewed-by: jjh
This commit is contained in:
parent
f1f86e9fa2
commit
64b449dd2a
@ -197,8 +197,12 @@ public class Locks {
|
||||
synchronized (ready) {
|
||||
// wait until WaitingThread about to wait for objC
|
||||
thrsync.waitForSignal();
|
||||
// give chance to enter wait.
|
||||
goSleep(100);
|
||||
|
||||
int retryCount = 0;
|
||||
while (waiter.getState() != Thread.State.WAITING
|
||||
&& retryCount++ < 500) {
|
||||
goSleep(100);
|
||||
}
|
||||
checkBlockedObject(waiter, objC, null, Thread.State.WAITING);
|
||||
|
||||
synchronized (objC) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user