This PR fixes an intermittent failing system test. On slow runs, calling `stage::show` and then Platform.runLater(stage::close)` before the test started could cause that the assertion in `stage.isShowing()` failed, if the test started after the stage was already closed.
Moving the call to close the stage to the test guarantees that the failing assertion passes, fixing the intermittent failure, while not altering the rest of the test. --------- - [X] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Delay closing stage to fix failing test Changes: https://git.openjdk.org/jfx/pull/2350/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2350&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8394826 Stats: 7 lines in 1 file changed: 4 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jfx/pull/2350.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2350/head:pull/2350 PR: https://git.openjdk.org/jfx/pull/2350
