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

Phil Race prr at openjdk.java.net
Tue Nov 2 03:18:09 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 90:

> 88:                     BufferedImage capture = robot.createScreenCapture(gd.getDefaultConfiguration().getBounds());
> 89:                     File captureFile = new File("capture.png");
> 90:                     ImageIO.write(capture, "png", captureFile);

Can you confirm this png gets written somewhere that isn't scratch spaced deleted at the end of testing ?
I don't think we do this multi-screen dance in most tests since the default screen should be good enough.
Why isn't it here ?

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

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



More information about the client-libs-dev mailing list