RFR: 8340790: Open source several AWT Dialog tests - Batch 4 [v2]

Harshitha Onkar honkar at openjdk.org
Mon Oct 14 19:56:11 UTC 2024


On Thu, 10 Oct 2024 08:34:31 GMT, Tejesh R <tr at openjdk.org> wrote:

>> 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. If you use CountDownLatch with await of 2 seconds then there is no need to the extra delay.
>> 
>> 
>>     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);
>
> I don't think `CountDownLatch` is required here. Anyhow I have added some delays after keypress too. Still didn't get failure in CI system. Please check with updated test once and revert.

Since you mentioned this test passes locally as well as on CI with the updated test changes, the open problemlist entry for macOS can be removed now, right?

`java/awt/Dialog/ChoiceModalDialogTest.java 8161475 macosx-all`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1800002292


More information about the client-libs-dev mailing list