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

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


On Wed, 3 Nov 2021 18:34:33 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> 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 ?
>
> I can confirm that in case of the failure the file is accessible in the work directory for download. I added this multi-monitor just in case if test fails because window is in the strange spot on multi-monitor configuration so i want to capture which screen it is on. That's not necessary since in 99.99% cases it will stay on the default display, but it does not hurt either.

You can ask the GraphcsDevice where the Frame is located from the Frame itself, not necessary to check the bounds etc.

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

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



More information about the client-libs-dev mailing list