<div dir="ltr"><div>Hi, All!</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Maxim.</div></div>