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

Parameterized tests must not use instances as parameters

    XMLWordPrintable

Details

    Description

      JDK-8244531 introduced parameterized tests to guard against memoryleaks in in all controls, namely BehaviorMemoryLeakTest and SkinMemoryLeakTest.

      They use control instances as parameters: that's incorrect because the parameter is shared by all test methods. This may lead to inter-test effects when the state of the control is changed. Which accidentally doesn't happen in those tests, they have a single test method each ;)

      The fix is to have control class as parameters and instantiate the control in setup.

      Attachments

        Issue Links

          Activity

            People

              fastegal Jeanette Winzenburg
              fastegal Jeanette Winzenburg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: