On Tue, 16 Sep 2025 11:05:07 GMT, Jayathirth D V <j...@openjdk.org> wrote:

> MenuDoubleShortcutTest > nonMacMenuBarComesBeforeScene(on linux) & 
> MenuDoubleShortcutTest > macSceneComesBeforeMenuBar(on macOS) fail 
> intermittently.
> 
> In every failure we can see that no Accelerator event in fired `Key press 
> event triggered no actions`.
> To initiate accelerator event we use `testKey()` method in this test. 
> `testKey()` method uses asynchronous `Platform.runLater()` to press 
> accelerator shortcut. We have 100ms delay after this asynchronous event to 
> check whether accelerators events are fired, but this is not fool-proof.
> 
> So this test is updated to make sure the asynchronous event in `testKey()` is 
> completed by using a `CountDownLatch`. Also i tried removing the delay that 
> we have after `testKey()` call, but it looks like 100ms delay is still needed 
> between keyPress and event callbacks.
> 
> Updated test is run 50 times on all platforms and there are no intermittent 
> failures seen.

This pull request has now been integrated.

Changeset: d8016e13
Author:    Jayathirth D V <j...@openjdk.org>
URL:       
https://git.openjdk.org/jfx/commit/d8016e13a85d77c72d73aa10322e0165abfcafa6
Stats:     5 lines in 1 file changed: 3 ins; 2 del; 0 mod

8364405: Intermittent MenuDoubleShortcutTest failure on Linux and macOS

Reviewed-by: kcr

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

PR: https://git.openjdk.org/jfx/pull/1906

Reply via email to