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

Test java/awt/EventQueue/NonComponentSourcePost.java is unstable

    Details

    • Subcomponent:
    • Resolved In Build:
      b07
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        This test fails time to time in the mach5.

        The test in question posts a number of events to the EventQueue and
        checks that all events are dispatched. But it had incorrect assumption
        that "while(q.peekEvent()!=null)" guarantees that all events were dispatched.

        In some rare cases, it is possible that peekEvent () returns null because
        the last event was removed from the queue, but this event was not necessarily
        dispatched at that moment.

        An updated test now uses "CountDownLatch" for proper synchronization and the
        test is moved to the open repo.

        PS: I have added "Toolkit.getDefaultToolkit().getSystemEventQueue().push(q)" otherwise
        the test hang when executed via command line.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  serb Sergey Bylokhov
                  Reporter:
                  serb Sergey Bylokhov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: