8160530: [TEST-BUG] Consistent failure of java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java
Reviewed-by: yan, prr, serb
--- a/jdk/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java Fri Apr 28 13:52:45 2017 -0700
+++ b/jdk/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java Mon May 01 10:24:07 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@
mouseDragAndDrop(robot, point, getCenterPoint(targetFrame));
- long time = System.currentTimeMillis() + 200;
+ long time = System.currentTimeMillis() + 1000;
while (!passed) {
if (time < System.currentTimeMillis()) {
@@ -222,10 +222,12 @@
}
Thread.sleep(10);
}
+ Robot robot = new Robot();
+ robot.setAutoDelay(50);
+ robot.waitForIdle();
+ robot.delay(200);
Point point = getCenterPoint(dialog);
- Robot robot = new Robot();
- robot.setAutoDelay(50);
robot.mouseMove(point.x, point.y);
robot.mousePress(InputEvent.BUTTON1_MASK);