On Thu, 25 Sep 2025 06:50:49 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> Test is currently problem-listed due to the test failing on both macOS arm
>> and x64 machines. Updated the test to use `SwingUtilities.invokeAndWait` and
>> use the EDT to dispose of the frame. Also needed to modify the delay for
>> stability. Initially, I removed `setAutoDelay` since this has caused issues
>> previously, but this caused a failure in linux (when previously linux has
>> never failed). However, keeping the auto delay and adding additional small
>> delays seems to be stable with all of the other changes to the test. The
>> test passes in CI with multiple runs of 100 on all OS's with the proposed
>> changes.
>
> test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java line 83:
>
>> 81: SwingUtilities.invokeAndWait(() -> {
>> 82: button.addMouseListener(new ButtonMouseListener());
>> 83: pointToDrag = getCenterPoint(button);
>
> Can we move this block to l72 right after we get pointToClick...since button
> is already initialised by now..
> It might bring some instability while we are in the midst of drag to do this
> block and then probably we can remove this additional delay when we have
> autoDelay
I'm in favour of adding listeners when UI is created unless the test logic
depends on adding the listener only later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2379826218