RFR: 8296589: PixelBufferDrawTest fails on some systems

Andy Goryachev angorya at openjdk.org
Wed Nov 9 19:16:49 UTC 2022


On Wed, 9 Nov 2022 18:38:27 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Issue happening on some hardware due to slightly different pixel values being returned.
>> 
>> Increased tolerance of asserts in compareColor function to allow these tests to pass (0.01 delta is still tighter than other similar tests which use 0.07).
>
> tests/system/src/test/java/test/robot/javafx/scene/PixelBufferDrawTest.java line 189:
> 
>> 187: 
>> 188:     private void compareColor(Color exp, Color act) {
>> 189:         Assert.assertEquals(exp.getRed(), act.getRed(), 0.01);
> 
> Since the tolerance value is used 4 times, maybe consider using a variable? Since this is preexisting, I'll approve it anyway and leave it up to you as to whether to change it.

Since someone initially chose a value w/o justification, perhaps we should create a constant and describe it (using Kevin's comment as a starting point).

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

PR: https://git.openjdk.org/jfx/pull/944


More information about the openjfx-dev mailing list