<AWT Dev> [14] Review Request: 8223108 Test java/awt/EventQueue/NonComponentSourcePost.java is unstable

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Dec 6 00:54:20 UTC 2019


Any volunteers to review? =)

On 10/13/19 3:22 am, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for JDK 14.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8223108
> Fix: http://cr.openjdk.java.net/~serb/8223108/webrev.00
> 
> 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 mailing list