RFR: 8339943: Frame not disposed in java/awt/dnd/DropActionChangeTest.java
Alexander Zvegintsev
azvegint at openjdk.org
Thu Sep 12 05:19:05 UTC 2024
On Wed, 11 Sep 2024 14:37:12 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.
My other comments are minor, because this changeset doesn't seem to help, if we increase the JTREG=REPEAT_COUNT from 10 to 100 it can still timeout on Windows.
test/jdk/java/awt/dnd/DropActionChangeTest.java line 75:
> 73:
> 74: public static void main(String[] args) throws Exception {
> 75: test = new DropActionChangeTest();
JFrame(aka DropActionChangeTest) is initialized on the main thread instead of the EDT.
test/jdk/java/awt/dnd/DropActionChangeTest.java line 100:
> 98: final DragSourceListener dsl = new DragSourceAdapter() {
> 99: public void dragDropEnd(DragSourceDropEvent e) {
> 100: System.err.println("DragSourseListener.dragDropEnd(): " +
Suggestion:
System.err.println("DragSourceListener.dragDropEnd(): " +
test/jdk/java/awt/dnd/DropActionChangeTest.java line 146:
> 144: try {
> 145: robot = new Robot();
> 146: robot.setAutoDelay(100);
Suggestion:
robot.setAutoDelay(100);
robot.waitForIdle();
robot.delay(500);
We usually wait a bit after calling `setVisible()`
test/jdk/java/awt/dnd/DropActionChangeTest.java line 176:
> 174: if (!dropEnd) {
> 175: captureScreen();
> 176: System.err.println("DragSourseListener.dragDropEnd() was not called, returning");
Suggestion:
System.err.println("DragSourceListener.dragDropEnd() was not called, returning");
-------------
PR Review: https://git.openjdk.org/jdk/pull/20951#pullrequestreview-2299103542
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1756007957
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1756022768
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1756133226
PR Review Comment: https://git.openjdk.org/jdk/pull/20951#discussion_r1756025576
More information about the client-libs-dev
mailing list