RFR: 8023263: [TESTBUG] Test closed/java/awt/Focus/InactiveWindowTest/InactiveFocusRace fails due to not enough time to initialize graphic components

Sergey Bylokhov serb at openjdk.org
Thu Sep 11 02:44:14 UTC 2025


On Wed, 10 Sep 2025 03:55:43 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> I didn't get the "previous version"..I just added a delay between the UI creation and test start.
>> Earlier also, init is called to do UI creation and then start is immediately called which sets 
>> 
>> inactiveFrame.setVisible(true);
>>         activeFrame.setVisible(true);
>> 
>> All the semaphore logic is still the same after that
>
> Test does
> - renders inactiveFrame
> - renders activeFrame
> - wait for active frame to be active
> - press on second button in inactive frame
> - wait for second button should be focus owner
> - Check Button2 should be the focus owner
> 
> I think the current test is also doing the same even now..

>All the semaphore logic is still the same after that

My point is that this logic is wrong. It should first check that the first window has become visible, then the second window, and only after that start the test execution. In this case, no additional changes would be necessary, or am I missing something?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27156#discussion_r2338362586


More information about the client-libs-dev mailing list