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

TreeTableViewMouseInputTest test_rt30394 unit test is not stable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • 8u20
    • javafx
    • Windows 7

      See RT-36955 for the background on this. The TreeTableViewMouseInputTest.test_rt30394 unit test is not stable. It started failing on our Linux nightly builds 100% of the time a couple weeks ago. The test was disabled on Linux to fix RT-36955 but that didn't address the root cause.

      I can now get that same test, TreeTableViewMouseInputTest.test_rt30394, to fail 100% of the time on my Windows 7 machine if I run the test class in isolation of the rest of the controls tests. This suggests that something in the test itself or in the test framework is affected by the state of either the FX runtime or the test framework.

      The following succeeds for me. All tests pass, including test_rt30394:

      $ gradle :controls:test

      :controls:test
      BUILD SUCCESSFUL

      The following fails for me with the same failure as it did on our nightly Linux test run (before you skipped the test on Linux):

      $ gradle -Dtest.single=javafx/scene/control/TreeTableViewMouseInputTest :controls:test

      javafx.scene.control.TreeTableViewMouseInputTest > test_rt30394 FAILED
         java.lang.AssertionError: expected:<1> but was:<0>
             at org.junit.Assert.fail(Assert.java:91)
             at org.junit.Assert.failNotEquals(Assert.java:645)
             at org.junit.Assert.assertEquals(Assert.java:126)
             at org.junit.Assert.assertEquals(Assert.java:470)
             at org.junit.Assert.assertEquals(Assert.java:454)
             at javafx.scene.control.TreeTableViewMouseInputTest.test_rt30394(TreeTabeViewMouseInputTest.java:269)

      20 tests completed, 1 failed, 1 skipped
      :controls:test FAILED


      Also, If I modify the build.gradle file to run each controls test class in its own VM as follows:

      diff --git a/build.gradle b/build.gradle
      --- a/build.gradle
      +++ b/build.gradle
      @@ -1578,6 +1578,7 @@

           test {
               jvmArgs "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit"
      + forkEvery = 1
           }

           // TODO Css2Bin really should be moved out and put into buildSrc if it can be


      a "gradle :controls:test" run will fail on that one test.

            jgiles Jonathan Giles
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: