changeset 17104:3d3ee4e0f595

8160530: [TEST-BUG] Consistent failure of java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java Reviewed-by: yan, prr, serb
author ssadetsky
date Mon, 01 May 2017 10:24:07 -0700
parents 7f76295dcd55
children 30a722cc06ec
files test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java	Fri Apr 28 13:52:45 2017 -0700
+++ b/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);