JDK-8335470 : [XWayland] JavaFX tests that use AWT Robot fail on Wayland
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: jfx23,jfx24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-07-01
  • Updated: 2025-03-25
  • Resolved: 2024-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx24 b21Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
tests/system/src/test/java/test/robot/javafx/embed/swing/SwingNodeJDialogTest.java . testNodeRemovalBeforeShow fails on Wayland even after resolving JDK-8326712 and JDK-8335468.


SwingNodeJDialogTest > testNodeRemovalBeforeShow FAILED
    java.lang.AssertionError: JDialog is above JavaFX stage
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at org.junit.Assert.assertFalse(Assert.java:65)
        at test.robot.javafx.embed.swing.SwingNodeBase.testAbove(SwingNodeBase.java:208)
        at test.robot.javafx.embed.swing.SwingNodeJDialogTest.testNodeRemovalBeforeShow(SwingNodeJDialogTest.java:67)


Similarly, tests/system/src/test/java/test/robot/javafx/scene/SRGBTest.java fails on XWayland:

SRGBTest > sRGBPixelTest FAILED
    org.junit.runners.model.TestTimedOutException: test timed out after 15000 milliseconds
        at java.base/java.lang.Object.wait0(Native Method)
        at java.base/java.lang.Object.wait(Object.java:366)
        at java.base/java.lang.Object.wait(Object.java:339)
        at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1365)
        at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346)
        at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
        at test.robot.javafx.scene.SRGBTest.getSRGBColorAtScreenCenter(SRGBTest.java:104)
        at test.robot.javafx.scene.SRGBTest.sRGBPixelTest(SRGBTest.java:225)
Comments
Changeset: b76c05b9 Branch: master Author: Alexander Zvegintsev <azvegint@openjdk.org> Date: 2024-12-11 13:53:12 +0000 URL: https://git.openjdk.org/jfx/commit/b76c05b9356656c1bd6a4a7026b858d3a935a51f
11-12-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1661 Date: 2024-12-10 14:10:23 +0000
10-12-2024

Note that even after JDK-8335469 is fixed (in FX) we can't re-enable these tests until JDK-8335468 is fixed (in AWT) and is in a promoted build of JDK 24. Once it is, we can replace the `assumeTrue(!Util.isOnWayland())` calls with: if (Util.isOnWayland()) { assumeTrue(Runtime.version().feature() >= 24); }
16-11-2024

I changed the title to be more generic and added another failing test to the description.
05-08-2024

This should be fixed with JDK-8326712, I keep the issue open to check again when JDK-8335468 is fixed.
03-07-2024