<AWT Dev>  Review Request: 8223108 Test java/awt/EventQueue/NonComponentSourcePost.java is unstable
Sergey.Bylokhov at oracle.com
Sun Oct 13 10:22:25 UTC 2019
Please review the fix for JDK 14.
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.
Best regards, Sergey.
More information about the awt-dev