On Fri, 9 Oct 2020 14:55:36 GMT, Nir Lisker <nlis...@openjdk.org> wrote:
>> tests/system/src/test/java/test/javafx/scene/lighting3D/PointLightAttenuationTest.java >> line 135: >> >>> 133: @AfterClass >>> 134: public static void teardown() { >>> 135: Platform.runLater(() -> { >> >> I forgot to mention that the `@AfterClass` method is still run even if the >> call to `assumeTrue` in the `@BeforeClass` >> method causes the test to be skipped. You will need to repeat the check (or >> set a flag in `initFX` and check that flag) >> here and skip the cleanup if the initialization was skipped (using an `if` >> check, not repeating the `assumeTrue`). >> Otherwise the exception that is thrown here will cause the test to fail. >> You can test this by forcing the SW pipeline. >> I did it like this: _JAVA_OPTIONS="-Dprism.order=sw" gradle --info >> -PFULL_TEST=true :systemTests:test --tests >> PointLightAttenuationTest > > The test fails even with this addition. I found that I need to use `@Before` > to run the check, and then I don't need > the ones in `@BeforeClass` and `@AfterClass`, should I keep those? Putting the `assumeTrue` in an `@Before` method seems best. I checked and it's what all of the other 3D tests do. There is no need to test for this in the `@BeforeClass` and `@AferClass` methods. ------------- PR: https://git.openjdk.java.net/jfx/pull/43