On Tue, 3 Oct 2023 22:36:15 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:

>> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 91:
>> 
>>> 89:             robot.setAutoWaitForIdle(true);
>>> 90:             robot.waitForIdle();
>>> 91:             robot.delay(DELAY_TIME);
>> 
>> To reduce the initial delay, you may override `Frame.paint` and `countDown` 
>> a latch after calling `super.paint`. Once the latch is released, you create 
>> robot and start testing.
>> 
>> `DELAY_TIME` could be set to `500` or even less.
>
> I reduced the `DELAY_TIME` to 500. Thanks for the suggestion. I got used to 
> setting the default delay times to 1000 for these types of tests, and am 
> trying to break the habit and reduce delays further to 500 where possible.

Well, I meant that you could reduce the delay if you add the latch.

However, 500ms should be enough now. Windows Vista and Windows 7 had long 
window animations when a window was shown on the screen, I believe this is 
where the delay of 1 second comes from. Windows 10 and 11 still have this 
animation but it's quicker.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1345658202

Reply via email to