提交 530defa7 编写于 作者: R rriggs

8216528:...

8216528: test/jdk/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java failing with Xcomp
Reviewed-by: dholmes, alanb
Contributed-by: fujie@loongson.cn
上级 12a09ec4
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
/* @test /* @test
* @bug 4404702 * @bug 4404702 8216528
* @summary When the RMI runtime (lazily) spawns system threads that could * @summary When the RMI runtime (lazily) spawns system threads that could
* outlive the application context in which they were (happened to be) * outlive the application context in which they were (happened to be)
* created, such threads should not inherit (thread local) data specific to * created, such threads should not inherit (thread local) data specific to
...@@ -106,7 +106,10 @@ public class RuntimeThreadInheritanceLeak implements Remote { ...@@ -106,7 +106,10 @@ public class RuntimeThreadInheritanceLeak implements Remote {
* context class loader-- by giving it a chance to pass away. * context class loader-- by giving it a chance to pass away.
*/ */
Thread.sleep(2000); Thread.sleep(2000);
System.gc(); while (loaderRef.get() != null) {
System.gc();
Thread.sleep(100);
}
System.err.println( System.err.println(
"waiting to be notified of loader being weakly reachable..."); "waiting to be notified of loader being weakly reachable...");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册