<Swing Dev> Integrated: 8260331: javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "ERROR: icon and imageIcon not same."
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Mon May 17 12:35:39 UTC 2021
On Mon, 17 May 2021 09:05:06 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> This testcase has failed intermittently in CI testing citing icon and ImageIcon images are not same.
> It's been observed that the rectangle been passed to Robot.createScreenCapture was incorrect to compare the icon images but is passing because the images were not different (but the images itself was incorrect) so not reliable.
>
> When it fails, it is seen that the icon and imageicon images captured, with height of the screenCapture which is the value of the topinset of internalFrame, is wrong and differ in some pixels at the end
> `icon captureRect java.awt.Rectangle[x=715,y=366,width=500,height=5]`
> The failed images look like (where one can see that there is some difference at the end of line)
> icon image
> 
> image icon
> 
>
> which is not compring the icon images actually.
>
> Rectified screenrect to correctly compare the icons. After the fix, the images being compared are these
> icon image
> 
> imageicon
> 
>
> Several iterations of the modified test execution is green on all platforms. Link in JBS.
> I have also verified the modified test fails without 8146321 fix.
This pull request has now been integrated.
Changeset: 39a454bb
Author: Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/39a454bb879fe316a69a4ec33ab287db2b5837db
Stats: 11 lines in 2 files changed: 4 ins; 1 del; 6 mod
8260331: javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "ERROR: icon and imageIcon not same."
Reviewed-by: azvegint
-------------
PR: https://git.openjdk.java.net/jdk/pull/4048
More information about the swing-dev
mailing list