# HG changeset patch # User ssadetsky # Date 1508166416 25200 # Node ID 4d711a58bb3b91d3f83145c2d513301d737658d1 # Parent a26c8a7739f04f72286a18f4e4fa9b248bc89102 8180821: [macosx]com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java: The menu item should have been GC-ed Reviewed-by: prr, psadhukhan diff -r a26c8a7739f0 -r 4d711a58bb3b 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