RFR: 8339943: Frame not disposed in java/awt/dnd/DropActionChangeTest.java [v2]

Alexander Zvegintsev azvegint at openjdk.org
Thu Sep 12 16:41:09 UTC 2024


On Thu, 12 Sep 2024 09:22:39 GMT, Manukumar V S <mvs at openjdk.org> wrote:

>> Stabilized the test by disposing the frame at the end, adding an auto delay,  called panel.getLocationOnScreen() in invokeAndWait(), formatting changes, etc
>> And for better debugging, added captureScreen() for failure cases.
>> 
>> Testing:
>> Tested using mach5 in all available platforms and attached the link in bug as a comment.
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments fixed : Creating frame in EDT, adding robot.delay() and robot.waitForIdle(), formatting changes, etc

Thank you, looks good, except for minor formatting issues.

test/jdk/java/awt/dnd/DropActionChangeTest.java line 75:

> 73: 
> 74:     public static void main(String[] args) throws Exception {
> 75:         EventQueue.invokeAndWait(()->test = new DropActionChangeTest());

Suggestion:

        EventQueue.invokeAndWait(() -> test = new DropActionChangeTest());

test/jdk/java/awt/dnd/DropActionChangeTest.java line 105:

> 103:                     System.err.println("FAILURE: wrong drop action:"
> 104:                                        + e.getDropAction()+", It should be "
> 105:                                        +DnDConstants.ACTION_MOVE);

Suggestion:

                    System.err.println("FAILURE: wrong drop action:"
                                       + e.getDropAction() + ", It should be "
                                       + DnDConstants.ACTION_MOVE);

test/jdk/java/awt/dnd/DropActionChangeTest.java line 194:

> 192:         System.err.println("Test passed!");
> 193:     }
> 194:     private static void disposeFrame() {

Suggestion:

    }

    private static void disposeFrame() {

test/jdk/java/awt/dnd/DropActionChangeTest.java line 202:

> 200:         }
> 201:     }
> 202:     private static void captureScreen(String str) {

Suggestion:

    }

    private static void captureScreen(String str) {

test/jdk/java/awt/dnd/DropActionChangeTest.java line 254:

> 252: 
> 253:     public static void doDrag(Robot robot, Point startPoint, Point endPoint) {
> 254:         robot.waitForIdle();

Suggestion:

       robot.waitForIdle();

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

Marked as reviewed by azvegint (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20951#pullrequestreview-2300862928
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1757216344
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1757222062
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1757216752
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1757217118
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1757218970


More information about the client-libs-dev mailing list