RFR: 8324239: JFXPanelHiDPITest fails on Windows 11 [v3]
Kevin Rushforth
kcr at openjdk.org
Mon Jan 22 20:56:34 UTC 2024
On Mon, 22 Jan 2024 09:56:01 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Test fails with
>>
>> JFXPanelHiDPITest > testScale FAILED
>> java.lang.NullPointerException: Cannot invoke "java.awt.image.BufferedImage.getWidth()" because "pixelsIm" is null
>>
>> because scenePeer is not yet created as the test is run with invokeLater.
>> FIx is to make it run with invokeAndWait so that it waits for the scene to be created..
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Use Platform.runAndWait
The test runs correctly now. Tests should generally use `Util.runAndWait` instead of `PlatformImpl.runAndWait`.
tests/system/src/test/java/test/robot/javafx/embed/swing/JFXPanelHiDPITest.java line 154:
> 152:
> 153: private void createScene(final JFXPanel fxPanel) {
> 154: PlatformImpl.runAndWait(() -> {
Generally we prefer `test.util.Util::runAndWait` so that exceptions are propagated.
-------------
PR Review: https://git.openjdk.org/jfx/pull/1344#pullrequestreview-1837336899
PR Review Comment: https://git.openjdk.org/jfx/pull/1344#discussion_r1462401494
More information about the openjfx-dev
mailing list