--- old/test/jdk/java/awt/Frame/FrameLocation/FrameLocation.java 2019-11-06 17:16:31.204352704 +0530 +++ new/test/jdk/java/awt/Frame/FrameLocation/FrameLocation.java 2019-11-06 17:16:30.892196703 +0530 @@ -40,20 +40,19 @@ Frame f = new Frame("test"); f.setBounds(X, Y, 250, 250); // the size doesn't matter f.setVisible(true); - + // 2 seconds must be enough for the WM to show the window + try { + Thread.sleep(2000); + } catch (InterruptedException ex) { + } for (int i = 0; i < 10; i++) { - // 2 seconds must be enough for the WM to show the window - try { - Thread.sleep(2000); - } catch (InterruptedException ex) { - } // Check the location int x = f.getX(); int y = f.getY(); if (x != X || y != Y) { - throw new RuntimeException("The frame location is wrong! Current: " + x + ", " + y + "; expected: " + X + ", " + Y); + throw new RuntimeException(i + " The frame location is wrong! Current: " + x + ", " + y + "; expected: " + X + ", " + Y); } // Emulate what happens when setGraphicsConfiguration() is called @@ -66,4 +65,3 @@ f.dispose(); } } -