Hi All,

Please review a testbug fix for an issue where the test fails on ubuntu in mach5 system. The test has already been modified twice via JDK-8161470 and JDK-8163169 to add waitForIdle() and delay for mac failure, however we still continued to see failure in ubuntu.

I added a delay after component.requestFocusInWindow() to allow the component to gain focus. With which the test has passed on several iterations on mach5 ubuntu (job details in JBS)

diff -r b5a7999ded93 test/jdk/ProblemList.txt
--- a/test/jdk/ProblemList.txt  Thu Apr 30 12:42:03 2020 +0530
+++ b/test/jdk/ProblemList.txt  Thu Apr 30 15:36:24 2020 +0530
@@ -851,7 +851,6 @@
 javax/swing/JTable/6263446/bug6263446.java 8169959 macosx-all
 javax/swing/JTree/6263446/bug6263446.java 8213125 macosx-all
 javax/swing/JTree/8003400/Test8003400.java 8197560 macosx-all,linux-all
*-javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java 8221902 linux-all,macosx-all*
 javax/swing/ToolTipManager/Test6256140.java 8233560 macosx-all
 javax/swing/text/View/8014863/bug8014863.java 8233561 macosx-all
 javax/swing/text/StyledEditorKit/4506788/bug4506788.java 8233561 macosx-all

diff -r b5a7999ded93 test/jdk/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java --- a/test/jdk/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java Thu Apr 30 12:42:03 2020 +0530 +++ b/test/jdk/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java Thu Apr 30 15:36:24 2020 +0530
@@ -134,6 +134,8 @@
     private static void runTestCase() throws Exception {
         focusOn(a);

+        robot.waitForIdle();
+        robot.delay(500);
         robot.keyPress(KeyEvent.VK_ENTER);
         robot.keyRelease(KeyEvent.VK_ENTER);
         robot.waitForIdle();
@@ -189,6 +191,7 @@
                 | IllegalAccessException e) {
             return false;
         }
+       System.out.println("Testing lookAndFeel " + lookAndFeelString);
         return true;
     }

Regards
Prasanta

Reply via email to