On Tue, 2 Nov 2021 03:13:43 GMT, Phil Race <p...@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 ?
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. ------------- PR: https://git.openjdk.java.net/jdk/pull/6161