On Thu, 15 May 2025 19:29:43 GMT, Jeremy Wood <d...@openjdk.org> wrote:

>> test/jdk/com/apple/laf/RootPane/RootPaneDefaultButtonTest.java line 131:
>> 
>>> 129:         robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
>>> 130: 
>>> 131:         robot.delay(1000);
>> 
>> it will be useful to add the same delay before the first call to test, right 
>> after invokeAndWait.....setVisible(...)
>> Also please move creation and access_to all Swing components to EDT(button, 
>> radioButton1)
>
> I added an additional delay. I'm not sure exactly what refactor you're 
> looking for, but I rewrote the test to put more in the EDT.
> 
> (I double-checked that the test still passes, but that doesn't prove much 
> since I've never reproduced a failure.)
> 
> I did try at one point blocking the testing thread until the EDT had a chance 
> to complete an invokeLater runnable, but that didn't seem to make a 
> difference so I didn't commit it.

The code in test() which access swing components(various buttons) also should 
be moved to EDT.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25244#discussion_r2094730331

Reply via email to