RFR: 8339975: Open some dialog awt tests 2 [v2]

Alisen Chung achung at openjdk.org
Tue Oct 15 02:48:17 UTC 2024


On Mon, 14 Oct 2024 16:36:39 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove incorrect tests
>
> test/jdk/java/awt/Dialog/DialogDisposeLeak.java line 42:
> 
>> 40: 
>> 41:     public static void main(String args[]) throws Exception {
>> 42:         EventQueue.invokeLater(() -> {
> 
> Suggestion:
> 
>         EventQueue.invokeAndWait(() -> {
> 
> 
> The test may prematurely end with `invokeLater` even before it starts testing anything, because jtreg will kill it after exiting the main.

the problem with using invokeAndWait is that the test uses a modal dialog and so everything is blocked once the dialog is shown in an invokeAndWait

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21488#discussion_r1800338617


More information about the client-libs-dev mailing list