RFR: 8367784: java/awt/Focus/InitialFocusTest/InitialFocusTest1.java failed with Wrong focus owner

Phil Race prr at openjdk.org
Wed Sep 17 17:38:46 UTC 2025


On Wed, 17 Sep 2025 07:09:22 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Test was deproblemlisted in https://github.com/openjdk/jdk/pull/27136 without any modifications as it was passing in testing.
> Since it again failed, added the execution in EDT to be more thread-safe.
> 
> Fix is tested against several CI jobs each with several iterations link of which is in JBS

test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest1.java line 60:

> 58:                 app.setVisible(true);
> 59:             });
> 60:             Thread.sleep(1000);

Why not use Robot so you can also use waitForIdle() ?

And is there a particular reason you think not using the EDT is why the test failed in CI ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27332#discussion_r2356251064


More information about the client-libs-dev mailing list