On Fri, 26 Sep 2025 16:44:37 GMT, Damon Nguyen <[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.
>
> Damon Nguyen has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Move listener. Add count reset.
Marked as reviewed by aivanov (Reviewer).
test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java line 59:
> 57: private static JLabel label;
> 58: private static JButton button;
> 59: private static JFrame frame;
Let's add some air into the declarations of the fields:
private static volatile int dragWindowMouseEnteredCount = 0;
private static volatile int buttonMouseEnteredCount = 0;
private static volatile int labelMouseReleasedCount = 0;
private static volatile Point pointToClick;
private static volatile Point pointToDrag;
private static MyDragWindow dragWindow;
private static JLabel label;
private static JButton button;
private static JFrame frame;
Is it easier to skim quickly instead a wall of declarations?
test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java line 81:
> 79: robot.delay(250);
> 80:
> 81: if (dragWindowMouseEnteredCount != 1) {
Would it still work the mouse cursor happened to be located over the label? I
think it should… Anyway, nothing's changed here, so it's unimportant.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27478#pullrequestreview-3295606421
PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2399780102
PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2399512173