-
Bug
-
Resolution: Fixed
-
P4
-
jfx13
To reproduce this problem, make a copy of the existing SwingFXUtilsTest test class, which is in modules/javafx.swing/src/test/java/test/javafx/embed/swing, and run the swing tests as following:
$ gradle -PFULL_TEST=true :swing:test
One of the two will fail.
This bug was discovered during the review ofJDK-8200224. The problem with the existing SwingFXUtilsTest class is that gradle runs multiple tests in the same VM and in an undefined, and unpredictable, order. This means that tests need to take care not to alter or rely on global state such as threads, static fields, global JavaFX state, and the running (or lack thereof) of the JavaFX runtime. The swing tests violate this rule and are therefore inherently unstable. The only reason this hasn't been a problem up to now is that the javafx.swing module contains a single test class, SwingFXUtilsTest.
As written, the test should be moved to the systemTests project, in the tests/system/src/test/java/test/javafx/embed/swing/ directory, which contains similar tests.
$ gradle -PFULL_TEST=true :swing:test
One of the two will fail.
This bug was discovered during the review of
As written, the test should be moved to the systemTests project, in the tests/system/src/test/java/test/javafx/embed/swing/ directory, which contains similar tests.