On Thu, 29 May 2025 00:22:13 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:

>> CopyAreaOOB.java was failing intermittently on some platforms on CI but 
>> recently it started to fail more frequently on macos-aarch64 when the entire 
>> test suite runs.
>> 
>> Test failure is not reproducible when the test is run individually (multiple 
>> times) on CI.
>> 
>> Rewritten the test and added debug logs that will be helpful to figure out 
>> the issue. 
>> 
>> - Added code to capture screenshot (entire screen as well as the frame) in 
>> case of failure.
>> - Since it tests multiple regions added a StringBuffer to consolidate the 
>> error logs before throwing RuntimeException.
>
> Harshitha Onkar has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   test update: Mouse move to off frame loc

@mrserb @aivanov-jdk 

I got the test to fail after some iterations. The issue is with the mouse 
pointer being at the place where robot.getRGB() is called as seen below. The 
fix is to move the mouse pointer to a location away from the test UI before 
taking a screenshot.

This happens on macos-aarch64 and I think the mouse pointer remains at the 
location last moved to by previous test (It explains why it happens only when 
certain tests run before it during entire test suite run and not when the test 
is run individually).
I'm still not sure as to why the mouse pointer is captured during screencapture 
on macos-aarch64 as I don't see it happening on macosx-x64.

<img 
src="https://github.com/user-attachments/assets/081780c5-3d88-48b3-86b5-10ed9d4a0114";
 alt="background" width="200" height="200">

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

PR Comment: https://git.openjdk.org/jdk/pull/25279#issuecomment-2917904917

Reply via email to