RFR: 8317288: [macos] java/awt/Window/Grab/GrabTest.java: Press on the outside area didn't cause ungrab

Alexander Zvegintsev azvegint at openjdk.org
Thu Nov 30 07:25:06 UTC 2023


On Tue, 28 Nov 2023 22:34:44 GMT, Alisen Chung <achung at openjdk.org> wrote:

> Added delays to stabilize test, test passes 50 times consecutively

test/jdk/java/awt/Window/Grab/GrabTest.java line 118:

> 116: 
> 117:         f.setVisible(true);
> 118:         w.setVisible(true);

Since you are already touching this test, all the GUI work can be moved to the EDT.

test/jdk/java/awt/Window/Grab/GrabTest.java line 119:

> 117:         f.setVisible(true);
> 118:         w.setVisible(true);
> 119:         Util.waitForIdle(robot);

Adding a delay could also improve the test stability (as you already did on lines 247 and 253). 
However, our usual practice is to add a 500-1000 ms delay after showing a frame to make it work even on really slow machines.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16867#discussion_r1410250980
PR Review Comment: https://git.openjdk.org/jdk/pull/16867#discussion_r1410223413


More information about the client-libs-dev mailing list