<Swing Dev> RFR JDK-8233638 [TESTBUG] Swing test ScreenMenuBarInputTwice.java fails on macos

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri May 1 13:18:58 UTC 2020


Hi All,

Please review a test bug fix for an issue where it is seen the test was failing on macOS during nightly testing.
It was found the test failed with the reason "IllegalComponentStateException: component must be showing on the screen to determine its location”
which was because the test calls 
Util.getCenterPoint(menu);
without giving it enough time for menu to be shown on screen. 
Test is updated to add waitForIdle() and delay() between the UI component is setup 
and test is executed for that component.

It now passed on macOS on mach5 for several iterations (mach5 job details in JBS)

Bug: https://bugs.openjdk.java.net/browse/JDK-8233638

diff -r 2ec6cfcdfb65 test/jdk/ProblemList.txt

--- a/test/jdk/ProblemList.txt	Thu Apr 30 22:47:27 2020 +0100
+++ b/test/jdk/ProblemList.txt	Fri May 01 18:38:09 2020 +0530
@@ -874,7 +874,6 @@
 javax/swing/JPopupMenu/4634626/bug4634626.java 8233556 macosx-all
 javax/swing/JPopupMenu/4458079/bug4458079.java 8233556 macosx-all
 javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 8233637 macosx-all
-javax/swing/JMenuItem/8139169/ScreenMenuBarInputTwice.java 8233638 macosx-all
 javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
 javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all
 javax/swing/JMenuBar/4750590/bug4750590.java 8233642 macosx-all

diff -r 2ec6cfcdfb65 test/jdk/javax/swing/JMenuItem/8139169/ScreenMenuBarInputTwice.java

--- a/test/jdk/javax/swing/JMenuItem/8139169/ScreenMenuBarInputTwice.java	Thu Apr 30 22:47:27 2020 +0100
+++ b/test/jdk/javax/swing/JMenuItem/8139169/ScreenMenuBarInputTwice.java	Fri May 01 18:38:09 2020 +0530
@@ -71,10 +71,20 @@
         robot.setAutoDelay(200);
         robot.setAutoWaitForIdle(true);
         createUIWithSeperateMenuBar();
+        robot.waitForIdle();
+        robot.delay(500);
         shortcutTestCase();
+        robot.waitForIdle();
+        robot.delay(250);
         cleanUp();
+        robot.waitForIdle();
+        robot.delay(250);
         createUIWithIntegratedMenuBar();
+        robot.waitForIdle();
+        robot.delay(500);
         menuTestCase();
+        robot.waitForIdle();
+        robot.delay(250);
         cleanUp();
     }

Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200501/a153270f/attachment.htm>


More information about the swing-dev mailing list