Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8028998

[TEST_BUG] [macosx] java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java failed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 19
    • 8, 11, 17, 19, 20
    • client-libs
    • None
    • b21
    • os_x

    Backports

      Description

        OS X 10.9 x64
        JDK 8 b117

        Test test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java failed

        Exception in thread "main" java.lang.RuntimeException: Failed. Drag exit was not called
        at MissedDragExitTest.main(MissedDragExitTest.java:107)
        Java Result: 1

        Seems the Util.waitForIdle() does not work as expected.

            Util.drag(r,
                    new Point(FRAME_LOCATION + FRAME_SIZE / 3, FRAME_LOCATION + FRAME_SIZE / 3),
                    new Point(FRAME_LOCATION + FRAME_SIZE / 3 *2 , FRAME_LOCATION + FRAME_SIZE / 3 *2),
                    InputEvent.BUTTON1_MASK);
            Util.waitForIdle(r);
            if (!dragExitCalled) {
                throw new RuntimeException("Failed. Drag exit was not called" );
            }

        After starting Util.drag() there is a call of Util.waitForIdle() method.
        But actually main thread does not wait for idling robot thread. It immediately verifies dragExitCalled propperty, that is still false.
        If set shorter track for mouse dragging (like 5 pixels), dragExitCalled has time for changing it state, and entire test passes.

        Attachments

          Issue Links

            Activity

              People

                mvs Manukumar V S
                pchelko Petr Pchelko (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: