On Thu, 25 Sep 2025 19:19:57 GMT, Damon Nguyen <[email protected]> wrote:

>> 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.

What if we move the listener and additionally we reset `buttonMouseEnteredCount 
` to 0 before we start the drag `robot.mouseMove(pointToClick.x, 
pointToClick.y);`
I guess that should not interfere with the test as it is checking for extra 
mouseEnter event after completion of drag

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2381221153

Reply via email to