RFR: 8022403: sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java fails [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Nov 16 04:10:55 UTC 2022


On Wed, 16 Nov 2022 03:31:50 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

>> This test was failing because of color difference on boundaries. Updated test case to not check edges and added color tolerance.
>> 
>> Also updated test to:
>> 1) Use standard GraphicsConfiguration bounds for image instead of constant numbers.
>> 2) Use waitForIdle before screen capture and added auto delay
>> 3) Move mouse pointer away from rendering content (In my local Mac it failed every time when mouse pointer was present over test frame)
>> 4) Remove usage of insets as it is undecorated and remove windows closing listener
>> 5) Dispose frame when test fails
>> 
>> With these changes test is not failing in CI with multiple runs on all platforms.
>
> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Enable DirectDraw/GDI test

test/jdk/sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java line 126:

> 124:                 robot.mouseMove(0,0);
> 125:             } catch (AWTException ex) {
> 126:                 System.err.println("Robot creation failed, continuing.");

Not sure if we should continue here as createScreenCapture is being used down below which would result in NPE
Also this try-block is for creation so I think setAutoDelay and mouseMove needs to be moved out of this block..
Also, better to use try-finally block to do frame.dispose()

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

PR: https://git.openjdk.org/jdk/pull/11158



More information about the client-libs-dev mailing list