RFR: 8307165: java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java timed out
Harshitha Onkar
honkar at openjdk.org
Wed May 3 21:47:18 UTC 2023
On Tue, 2 May 2023 20:46:00 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
> When converting this test to be applicable to be open sourced, changes were made. I reverted some of these changes to get the test stable again. Now it passes when run on various OS's 100x.
test/jdk/java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java line 97:
> 95: frame.getToolkit().addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK);
> 96: frame.pack();
> 97: frame.setLocationRelativeTo(null);
It would be better to retain `frame.setLocationRelativeTo(null)` since you are calling `getLocationOnScreen()` later on.
test/jdk/java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java line 104:
> 102: try {
> 103: Robot robot = new Robot();
> 104: Thread.sleep(FRAME_ACTIVATION_TIMEOUT);
Curious to know the difference of using `Thread.sleep()` instead of `robot.delay()` here ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13761#discussion_r1184320143
PR Review Comment: https://git.openjdk.org/jdk/pull/13761#discussion_r1184317155
More information about the client-libs-dev
mailing list