RFR: 8169474: KeyCharTest: Wrong number of key events: 0

Sergey Bylokhov serb at openjdk.java.net
Thu Nov 4 21:35:12 UTC 2021


On Thu, 28 Oct 2021 17:02:45 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

> When i reproduced the test failures locally on Ubuntu 18 it seems like AWT Frame
> that appeared on the screen had not received focus and keyboard events went to the
> Window Manager which ignored them for having no meaning in the current context.
> Added explicit toFront and requestFocus calls so window gets focused.

test/jdk/java/awt/event/KeyEvent/KeyChar/KeyCharTest.java line 48:

> 46: 
> 47:         Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
> 48: 

This test was excluded on macOS because it leaves some buttons pressed. I think the reason was an exception on EDT, then the jtreg stops the test when we get an exception below but before we release the delete button on the main thread.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6161



More information about the client-libs-dev mailing list