RFR: 8282270: java/awt/Robot Screen Capture tests fail after 8280861

Alexey Ivanov aivanov at openjdk.java.net
Tue Mar 8 16:13:07 UTC 2022


On Thu, 24 Feb 2022 22:04:19 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>>> I submitted a job for testing the changes.
>> 
>> Thanks a lot!
>
>> > I submitted a job for testing the changes.
>> 
>> Thanks a lot!
> 
> I got 1 failure out of 15 on Linux for `java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java`. The screenshot of the entire screen has no open windows: just plain desktop background. It was probably captured after the test was shutdown.
> 
> The test doesn't save the captured image on failure, does it?
> 
> It's crucial to save the captured images, otherwise we're blind and left to guess what Robot captured and why it didn't match.

> @aivanov-jdk Could you please re-run the test? Thanks once more!

Sorry for my delayed reply.

One failure reported:

command: main -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2 HiDPIRobotScreenCaptureTest
...
----------System.out:(3/218)----------
Creating screen capture of java.awt.Rectangle[x=83,y=97,width=400,height=300]
Checking (100, 75) to have color java.awt.Color[r=0,g=255,b=0]
... Mismatch: found java.awt.Color[r=135,g=8,b=69] instead. Check image.png.
----------System.err:(12/723)----------
java.lang.RuntimeException: Wrong image color!
	at HiDPIRobotScreenCaptureTest.checkRectColor(HiDPIRobotScreenCaptureTest.java:125)
	at HiDPIRobotScreenCaptureTest.main(HiDPIRobotScreenCaptureTest.java:108)
...

![The captured image.png](https://user-images.githubusercontent.com/70774172/157277072-febab0d6-bef3-43df-a98f-8b6b6eea60ff.png)

The checked point (x, y) = (100, 75) is 10 pixels into the green square but it's 55 pixels above the square.

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

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



More information about the client-libs-dev mailing list