RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux

Alexandre Iline shurailine at openjdk.java.net
Mon May 23 17:29:55 UTC 2022


On Mon, 23 May 2022 16:45:09 GMT, Phil Race <prr at openjdk.org> wrote:

> Can you explain both the problem and the solution ?

>From what I have observed, the test starts before the window is painted. The window is basically gray. My hypothesis is then that it takes time to load the background image and the test starts before that.

So the fix is to wait for the image to be loaded. To do that I find the label (by description of the icon) and wait for getImageLoadStatus() == MediaTracker.COMPLETE of that icon.

Additionally, after the image is loaded, I capture an image of the screen and also save UI state in an xml file. Should the test fail again, there will hopefully be more information available.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8848



More information about the client-libs-dev mailing list