7057320: test/java/util/concurrent/Executors/AutoShutdown.java failing intermittently
Add retry/timeout for checking activeCount Reviewed-by: chegar
This commit is contained in:
parent
e3c0616ac7
commit
517763ddf1
@ -67,6 +67,11 @@ public class AutoShutdown {
|
||||
e1 = e2 = null;
|
||||
for (int i = 0; i < 10 && Thread.activeCount() > count0; i++)
|
||||
tryWaitForFinalizersToRun();
|
||||
for (int i = 0; i < 10; ++i) { // give JVM a chance to settle.
|
||||
if (Thread.activeCount() == count0)
|
||||
return;
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
equal(Thread.activeCount(), count0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user