On Mon, 16 Jun 2025 17:39:35 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> tests/system/src/test/java/test/robot/javafx/stage/StageFocusTest.java line 
>> 113:
>> 
>>> 111:             robot.keyPress(KeyCode.A);
>>> 112:         });
>>> 113:         assertTrue(receivedEvent, "Expected key press has NOT been 
>>> received! Stage did not have focus after showing. Some tests might fail 
>>> because of this." +
>> 
>> Do you need to sleep before the assertion to ensure that the event has been 
>> delivered?
>
> Perhaps we ought to have a utility (latch?) to ensure the sequence?

A delay of some sort is necessary to give the event loop time to process the 
event.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1804#discussion_r2152468920

Reply via email to