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:51 UTC 2025


On Thu, 15 May 2025 19:22:06 GMT, Jeremy Wood <duke at openjdk.org> wrote:

>> Unfortunately I'm unable to reproduce this failure. I slowed the test down; it passes on my machine before and after this PR.
>> 
>> I added a little bit of logging that might also help identify what's happening.
>> 
>> Does anyone have any more suggestions?
>
> Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - 8356061: restructuring to move things to EDT
>    
>    This was requested here:
>    https://github.com/openjdk/jdk/pull/25244#discussion_r2091656355
>    
>    mrserb asked: "Also please move creation and access_to all Swing components to EDT"
>    
>    (I'm not sure this will help much? My understanding was *creation* of Swing components could happen off the EDT as long as they were made displayable on the EDT.)
>    
>    Now we still call jc.getLocationOnScreen off the EDT. If that posed a thread-based problem it'd probably manifest as a IllegalComponentStateException, which is not mentioned in 8356061.
>  - 8356061: adding 1000ms pause after window construction
>    
>    This was requested here:
>    https://github.com/openjdk/jdk/pull/25244#discussion_r2091656355
>    
>    So now we'll pause at least 1.1s before the first call to `jc.getLocationOnScreen`, and at least 2.1s before the first call to `robot.getPixelColor(x, y)`.
>    
>    (getLocationOnScreen has never failed with an IllegalStateException.)

I think the test can be greatly simplified if you redirect all rendering into a BufferedImage, in that case the use of robot can be removed.

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

PR Comment: https://git.openjdk.org/jdk/pull/25244#issuecomment-2889420453


More information about the client-libs-dev mailing list