RFR: 8340790: Open source several AWT Dialog tests - Batch 4 [v2]
Harshitha Onkar
honkar at openjdk.org
Wed Oct 9 16:58:01 UTC 2024
On Wed, 9 Oct 2024 09:28:40 GMT, Tejesh R <tr at openjdk.org> wrote:
>> Open source these AWT Dialog tests:
>>
>> java/awt/Dialog/FileDialogGetFileTest.java
>> java/awt/Dialog/EnabledResetTest.java
>> java/awt/Dialog/ChoiceModalDialogTest.java
>> java/awt/Dialog/DialogBackgroundTest.java
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>
> Updated review comments
Changes requested by honkar (Reviewer).
test/jdk/java/awt/Dialog/ChoiceModalDialogTest.java line 111:
> 109: });
> 110: r.delay(500);
> 111: r.waitForIdle();
It is usually waitForIdle() followed by a delay().
Here and at other locations.
test/jdk/java/awt/Dialog/ChoiceModalDialogTest.java line 120:
> 118: r.keyRelease(KeyEvent.VK_A);
> 119:
> 120: });
This test fails with `keyOK = false` due to missing delay after KeyEvent.
To make the test more stable, I think it might be better to convert keyOK and mouseOK into CountDownLatch.
private static volatile CountDownLatch keyOK = new CountDownLatch(1);
private static volatile CountDownLatch mouseOK = new CountDownLatch(1);
Suggestion:
r.keyRelease(KeyEvent.VK_A);
});
r.waitForIdle();
r.delay(500);
-------------
PR Review: https://git.openjdk.org/jdk/pull/21404#pullrequestreview-2357704338
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793856016
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793855338
More information about the client-libs-dev
mailing list