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 looks like the right fix. ------------- Marked as reviewed by kcr (Lead). PR Review: https://git.openjdk.org/jfx/pull/1906#pullrequestreview-3231041658