JDK-8296554 : MouseLocationOnScreenTest sometime fails when system is busy
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: jfx20
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-11-08
  • Updated: 2025-04-24
  • Resolved: 2025-04-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx25 b14Fixed
Related Reports
Relates :  
Description
I very occasionally get a failure while running MouseLocationOnScreenTest on Windows. Here is one such failure:

MouseLocationOnScreenTest > testMouseLocation FAILED
    java.lang.AssertionError: expected:<1227> but was:<1226>
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)
        at org.junit.Assert.assertEquals(Assert.java:647)
        at org.junit.Assert.assertEquals(Assert.java:633)
        at test.robot.javafx.scene.MouseLocationOnScreenTest.validate(MouseLocationOnScreenTest.java:131)
        at test.robot.javafx.scene.MouseLocationOnScreenTest.cross(MouseLocationOnScreenTest.java:159)
        at test.robot.javafx.scene.MouseLocationOnScreenTest.lambda$testMouseLocation$10(MouseLocationOnScreenTest.java:117)

My system was somewhat busy running other processes at the time. After rerunning this several times with an idle system, it doesn't fail. The fix for JDK-8213573 added a small delay to workaround the limitation inherent in this test. If the system is too heavily loaded, it can still fail occasionally.
Comments
Changeset: 703a9a90 Branch: master Author: Gopal Pattnaik <gopal.pattnaik@oracle.com> Committer: Ambarish Rapte <arapte@openjdk.org> Date: 2025-04-21 06:36:58 +0000 URL: https://git.openjdk.org/jfx/commit/703a9a9049c75c6f0fe04082b4ad97e1f97eb1f5
21-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1772 Date: 2025-04-11 09:37:12 +0000
11-04-2025

Unless we start seeing this more that just occasionally on a busy dev system, we are unlikely to do anything about this.
08-11-2022