On Wed, 4 Oct 2023 17:45:25 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:

>> This test intermittently fails by timeout. Increasing the timeout alone 
>> doesn't solve the failure as it still fails in about 400 runs. Adding 
>> another delay and reducing the delay amount to 1000ms. Now, the test passes 
>> after 2 sets of 500 repeats on all OS's without a timeout.
>
> Damon Nguyen has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Move condition to loop parameters

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 101:

> 99:             robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
> 100:             for (Point p = new Point(startPoint);
> 101:                  !p.equals(endPoint) || incorrectActionDetected;

Suggestion:

                 !p.equals(endPoint) && !incorrectActionDetected;

You keep iterating while both conditions are true. As soon as either is false, 
exit the loop.

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

PR Review: https://git.openjdk.org/jdk/pull/16018#pullrequestreview-1659420937
PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1347152843

Reply via email to