On Wed, 16 Nov 2022 17:54:17 GMT, Andy Goryachev <[email protected]> wrote:
>> 1. Introduced the following utility methods:
>> - Util.launch
>> - Util.shutdown
>> - Util.waitForLatch
>> 2. Fixed the out-of order calls to Stage.hide() and Platform.exit() in many
>> tests' shutdowns.
>> 3. Replaced local waitForLatch copies with Util.waitForLatch
>
> Andy Goryachev has updated the pull request incrementally with one additional
> commit since the last revision:
>
> 8206430: default timeout 15
tests/system/src/test/java/test/renderlock/RenderLockCommon.java line 124:
> 122: @AfterClass
> 123: public static void doTeardownOnce() {
> 124: Util.shutdown();
This change causes the test to fail on Linux due to a latent test bug (specific
to this test). The test is skipped on Linux using `assumeTrue` in an
`@BeforeClass` method. This causes all test methods to be skipped, but the
`@AfterClass` method is still run unconditionally. The `Util.shutdown` method
calls `Platform.runLater` which will throw an exception if the FX runtime was
never started. This causes JUnit to fail with a "DefaultMultiCauseException".
I recommend either moving the `assumeTrue` to the `@Test` method in the
`RenderLock1Test` class (there is only one) or else qualifying the call to
`Util.shutdown` with `if (myApp != null)` so we don't call it if the platform
wasn't launched.
-------------
PR: https://git.openjdk.org/jfx/pull/950