RFR: 8298823: [macos] java/awt/Mouse/EnterExitEvents/DragWindowTest.java continues to fail with "No MouseReleased event on label!" [v2]
Damon Nguyen
dnguyen at openjdk.org
Thu Sep 25 19:22:20 UTC 2025
On Thu, 25 Sep 2025 18:49:22 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> I'm in favour of adding listeners when UI is created unless the test logic depends on adding the listener only later.
>
> I have moved the listener addition to the createUI method and combined the `getCenterPoint` calls to one `invokeAndWait` block at the start. However, this did not alleviate the need for the additional delays. Removing the delays caused failures on linux and macos. However, when the delays are re-added, the test passes again on all OS's through 3 sets of 100 repeats.
Actually, it seems like moving the addition of the listener can cause some issues that lead to failures. Moving it as you suggested works fine locally, but in testing on CI the test fails on all OS's due to `buttonMouseEnteredCount` being non-0. I'm assuming since the listener is added earlier in the test, the count would be 1 instead since the Robot's mouse movement would enter the button area once, but then the test fails locally. I'll keep the addition of the button listener where it originally was to avoid having the complexity of solving this both locally and in CI.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2380103330
More information about the client-libs-dev
mailing list