changeset 54074:5e9f3a73abab

8216528: test/jdk/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java failing with Xcomp Reviewed-by: dholmes, alanb Contributed-by: fujie@loongson.cn
author rriggs
date Thu, 31 Jan 2019 10:05:11 -0500
parents f72661ff0294
children 5bc1634bc0ca
files test/jdk/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java	Thu Jan 31 07:28:40 2019 -0500
+++ b/test/jdk/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java	Thu Jan 31 10:05:11 2019 -0500
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4404702
+ * @bug 4404702 8216528
  * @summary When the RMI runtime (lazily) spawns system threads that could
  * outlive the application context in which they were (happened to be)
  * created, such threads should not inherit (thread local) data specific to
@@ -106,7 +106,10 @@
              * context class loader-- by giving it a chance to pass away.
              */
             Thread.sleep(2000);
-            System.gc();
+            while (loaderRef.get() != null) {
+                System.gc();
+                Thread.sleep(100);
+            }
 
             System.err.println(
                 "waiting to be notified of loader being weakly reachable...");