On Fri, 15 Sep 2023 15:20:36 GMT, Lukasz Kostyra <lkost...@openjdk.org> wrote:
> The instability came from the way Windows sets window's default position. > When it is not predefined on Stage creation (which was the case in these > Robot tests) the window is created at some arbitrary position chosen by > Windows near top-left corner. It also seems like Windows first picks the > position assuming 100% scaling and then multiplies it by UI scale, which can > provide X/Y coordinates of Stage with a fractional value. > > Due to above behavior, there is a chance that the fractional part of X/Y will > be above .5 which fails the test (X/Y values were fetched via casting > directly to `int`, which drops the fractional part without rounding). Adding > rounding makes the test always pass and the assumption in the comment below > consistent. > > `unstable.test` property check was removed, since this change stabilizes the > test and its results. > > Verified also on macOS to ensure the change did not affect the tests. This pull request has now been integrated. Changeset: 2ae8c270 Author: Lukasz Kostyra <lkost...@openjdk.org> URL: https://git.openjdk.org/jfx/commit/2ae8c270ea99c2e979e4922a9652363f59d4b293 Stats: 7 lines in 1 file changed: 0 ins; 4 del; 3 mod 8255079: RobotTest::testPixelCaptureAverage fails intermittently on Windows with HiDPI scaling Reviewed-by: kcr ------------- PR: https://git.openjdk.org/jfx/pull/1242