# HG changeset patch # User psadhukhan # Date 1559041547 -19800 # Node ID 8cddb14bb23467e4633d860223c61b83c9f464ab # Parent 4929c53ff29d94df675f9e08920e27525b629ff1 8224830: test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java fails on linux-x64 Reviewed-by: jdv diff -r 4929c53ff29d -r 8cddb14bb234 test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java --- a/test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java Mon May 27 12:24:26 2019 -0700 +++ b/test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java Tue May 28 16:35:47 2019 +0530 @@ -113,7 +113,9 @@ } else { robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + (int)(d.getHeight()/2)); } + waitForIdle(); robot.mousePress(InputEvent.BUTTON1_MASK); + robot.delay(50); robot.mouseRelease(InputEvent.BUTTON1_MASK); waitForIdle(); } @@ -121,8 +123,9 @@ while (true) { try { Thread.sleep(100); - c.getLocationOnScreen(); - break; + Point p = c.getLocationOnScreen(); + if (p != null) + break; } catch (InterruptedException e) { throw new RuntimeException(e); } catch (IllegalComponentStateException e) {}