On Tue, 9 Sep 2025 17:45:10 GMT, Sergey Bylokhov <[email protected]> wrote:
>> Test was failing due to lack of time between initializing graphics
>> components and test start.
>> Added robot delay and execution under EDT.
>>
>> Several iterations of test is passing so deproblemlisting, CI job link in JBS
>
> test/jdk/java/awt/Focus/InactiveFocusRace.java line 109:
>
>> 107: }
>> 108: });
>> 109: inactiveFrame.setVisible(true);
>
> The previous version used a Semaphore to wait until the frame became active
> or the button received focus, but it didn’t check the second inactive frame.
> I think what we should do is first show the "inactive" frame using the same
> Semaphore. Then, once it becomes visible, we should show another "active"
> frame.
> This will ensure that the frame we intend to click below remains
> inactive/unfocused.
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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27156#discussion_r2335404741