8180821: [macosx]com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java: The menu item should have been GC-ed
authorssadetsky
Mon, 16 Oct 2017 08:06:56 -0700
changeset 47387 4d711a58bb3b
parent 47386 a26c8a7739f0
child 47388 19b912843392
8180821: [macosx]com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java: The menu item should have been GC-ed Reviewed-by: prr, psadhukhan
test/jdk/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java
--- a/test/jdk/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Fri Oct 13 08:54:00 2017 -0700
+++ b/test/jdk/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Mon Oct 16 08:06:56 2017 -0700
@@ -24,7 +24,7 @@
 /**
  * @test
  * @key headful
- * @bug 8158325
+ * @bug 8158325 8180821
  * @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
  * @requires (os.family == "mac")
  * @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
@@ -67,6 +67,7 @@
         });
         System.gc();
         System.runFinalization();
+        Thread.sleep(1000);
         JMenuItem menuItem = sMenuItem.get();
         EventQueue.invokeAndWait(new Runnable() {
             @Override