Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8326027

[TEST_BUG] Comparing screenshots of frame with white background fails in Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21
    • client-libs
    • None

      FULL PRODUCT VERSION :
      openjdk version "20"

      A DESCRIPTION OF THE PROBLEM :
      test/jdk/javax/swing/JFrame/JFrameBackgroundRefreshTest.java fails in macos.
      Comparison of two buffered images of white background fails consistently on CI system arrch64 mac machine. Comparison is done by RGB values and it varies from -1118226 to -1118482 at certain x and y position. This behavior is not observed in local machine runs.

      ----------System.out:(2/50)----------
      Got : -1118226 (0xFFEE'EFEE), expected : -1118482 (0xFFEE'EEEE)
      x : 4, y : 15
      ----------System.err:(11/619)----------
      java.lang.RuntimeException: Test Failed!
      at JFrameBackgroundRefreshTest.main(JFrameBackgroundRefreshTest.java:105)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.Thread.run(Thread.java:1575)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Test Failed!
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test Failed!

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached test.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The test should pass since the white background frame is clearly visible without any distortion.
      ACTUAL -
      The test fails for BufferedImage comparison.

      REPRODUCIBILITY :
      This bug can be reproduced always.

            tr Tejesh R
            tr Tejesh R
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: