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

conditional execution of unstable tests

XMLWordPrintable

        The windowCloseTest in the test.renderlock.RenderLock1Test unit test fails on our nightly unit test machine.

        java.lang.AssertionError: Timeout waiting for alert to be hidden
            at org.junit.Assert.fail(Assert.java:91)
            at test.renderlock.RenderLockCommon.doWindowCloseTest(RenderLockCommon.java:175)
            at test.renderlock.RenderLock1Test.windowCloseTest(RenderLock1Test.java:33)

        We had previously qualified this test to run only when the robot tests are run -- that is, when USE_ROBOT is set to true -- but the recent refactoring done for JDK-8145203 has put all robot tests in a separate package hierarchy, and since this isn't a robot test it is no longer excluded.

        We will need some other means to exclude this test (or add it back in as a special case test that is also qualified by USE_ROBOT, but that is a bit of a hack).

        The means chosen is a system property passed from gradle to all of the test bundles:
            systemProperty 'unstable.test', IS_UNSTABLE_TEST
        toggled by gradle -PUNSTABLE_TEST=true

        and used as a toggle in test classes:
            assumeTrue(Boolean.getBoolean("unstable.test"));

              ddhill David Hill (Inactive)
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: