提交 8fa4c3e4 编写于 作者: D dl

7057320: test/java/util/concurrent/Executors/AutoShutdown.java failing intermittently

Summary: Add retry/timeout for checking activeCount
Reviewed-by: chegar
上级 c908a707
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册