RFR: 8341370: Test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails intermittently on macOS-aarch64
Damon Nguyen
dnguyen at openjdk.org
Thu May 22 23:37:53 UTC 2025
On Wed, 21 May 2025 13:13:46 GMT, Manukumar V S <mvs at openjdk.org> wrote:
> ShapeNotSetSometimes.java fails intermittently with a RuntimeException on macOS-aarch64
> Test threw exception: java.lang.RuntimeException: Test failed. The shape has not been applied.
>
> Fix:
> The test has been modified to take a screenshot of the area and then analyse the pixel color in the screenshot rather than getting individual pixels from the screen for each test.
> Also the timeout of the test has been increased to 5 minutes(300 seconds) as sometimes it times out with the default timeout of 2 minutes(120 seconds).
>
> Testing:
> After fixing the test, it has been run 40 times per platform(Windows, Linux, MacOS x64 and MacOS aarch64) using Mach5 and got 100% pass rate .
I tested the changes locally and through CI. The test now passes seemingly consistently when removed from the problem list. I ran it with 50 repeats on all OS's with no failures.
In addition to testing the changes as shown in this PR, I also tested with just adding the timeout (without the screen capture change), and it still passes (which might hint at the timeout being related to the primary issue here). However, I still prefer the changes made.
test/jdk/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java line 175:
> 173: }
> 174:
> 175: private void colorCheck(int x, int y, Color expectedColor, boolean mustBeExpectedColor,BufferedImage screenCapture) {
Suggestion:
private void colorCheck(int x, int y, Color expectedColor, boolean mustBeExpectedColor, BufferedImage screenCapture) {
-------------
Marked as reviewed by dnguyen (Committer).
PR Review: https://git.openjdk.org/jdk/pull/25354#pullrequestreview-2862625754
PR Review Comment: https://git.openjdk.org/jdk/pull/25354#discussion_r2103436161
More information about the client-libs-dev
mailing list