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. Looks good. The test is now stable on my Windows 10 system using 125% scaling. ------------- Marked as reviewed by kcr (Lead). PR Review: https://git.openjdk.org/jfx/pull/1242#pullrequestreview-1629272043