RFO: GUI tests for wakefield
Maxim Kartashev
maxim.kartashev at jetbrains.com
Wed Dec 10 13:09:13 UTC 2025
Hi, All!
Many tests in test/jdk/javax/swing/ or awt/ that we run turned out to be
not very useful: they create some UI and then immediately return from
main(). If such a test is executed under jtreg, jtreg will almost
immediately call System.exit() and terminate the whole test. One concrete
example is test/jdk/javax/swing/PopupFactory/8048506/bug8048506.java, but
there are many more like this.
Currently, running such tests on Linux/Xorg may cause a window to flash
briefly, which could be enough time for the test to actually complete (but
maybe not). Under Wayland, however, showing a window on the screen requires
an involved, asynchronous process of negotiation with the server; this
happens on EDT after setVisible(true) has returned already. Consequently,
such tests under Wayland usually don't run long enough for a single pixel
to be shown on the screen. The process exits at around the time the Wayland
server agrees about the size and the role of the window.
The specification of Component.setVisible() is vague, so I defer to the
expertise of people on this list to determine which part is at fault and
needs to be "fixed". Should such tests wait before exiting main()? Or
should the Wayland toolkit guarantee that the window is indeed on the
screen before setVisible(true) returns?
Thanks in advance.
Maxim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/wakefield-dev/attachments/20251210/2cb776f8/attachment-0001.htm>
More information about the wakefield-dev
mailing list