RFR: 8356061: [macos] com/apple/laf/RootPane/RootPaneDefaultButtonTest.java test fails on macosx-aarch64 machine [v2]

Sergey Bylokhov serb at openjdk.org
Mon May 19 02:15:52 UTC 2025


On Thu, 15 May 2025 19:29:43 GMT, Jeremy Wood <duke at 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


More information about the client-libs-dev mailing list