Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296554

MouseLocationOnScreenTest sometime fails when system is busy

XMLWordPrintable

      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.

            gpattnaik Gopal Pattnaik
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: