RFR: 8256649: Parameterized tests must not use instances as parameters

Jeanette Winzenburg fastegal at openjdk.java.net
Fri Nov 20 10:37:00 UTC 2020


On Thu, 19 Nov 2020 23:38:33 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> 
> 
> Parameters should be immutable

would have been a far better bug title :)

> to avoid this. Each test runs in its own instance, but if a test stores a reference to a parameter and then modifies it, that modification will leak into subsequent tests. FWIW, the same thing can happen if a test modifies a static field or if it modifies global state of the JavaFX runtime.

.. and nice summary as well

-------------

PR: https://git.openjdk.java.net/jfx/pull/356


More information about the openjfx-dev mailing list