RFR: 8377189: Intermittent failure in TooltipTest.testCssStylesheetChangeTooltip
Lukasz Kostyra
lkostyra at openjdk.org
Fri Feb 6 14:06:02 UTC 2026
On Fri, 6 Feb 2026 02:33:02 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
> `test.robot.javafx.scene.TooltipTest` modifies the scene graph on a test worker thread, which can corrupt the scene graph and leads to test failures such as:
>
>
> TooltipTest > testCssStylesheetChangeTooltip() FAILED
> java.lang.AssertionError
> at [javafx.graphics at 27-ea](mailto:javafx.graphics at 27-ea)/com.sun.javafx.css.StyleMap.getCascadingStyles(StyleMap.java:144)
> at [javafx.graphics at 27-ea](mailto:javafx.graphics at 27-ea)/javafx.scene.CssStyleHelper.resetToInitialValues(CssStyleHelper.java:490)
> at [javafx.graphics at 27-ea](mailto:javafx.graphics at 27-ea)/javafx.scene.CssStyleHelper.createStyleHelper(CssStyleHelper.java:193)
> at [javafx.graphics at 27-ea](mailto:javafx.graphics at 27-ea)/javafx.scene.Node.reapplyCss(Node.java:9996)
> at [javafx.graphics at 27-ea](mailto:javafx.graphics at 27-ea)/javafx.scene.Node.reapplyCSS(Node.java:9959)
> at [javafx.graphics at 27-ea](mailto:javafx.graphics at 27-ea)/javafx.scene.Scene$10.onChanged(Scene.java:1682)
> at [javafx.base at 27-ea](mailto:javafx.base at 27-ea)/com.sun.javafx.collections.TrackableObservableList.lambda$new$0(TrackableObservableList.java:44)
> at [javafx.base at 27-ea](mailto:javafx.base at 27-ea)/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:162)
> at [javafx.base at 27-ea](mailto:javafx.base at 27-ea)/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:71)
> at [javafx.base at 27-ea](mailto:javafx.base at 27-ea)/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:246)
> at [javafx.base at 27-ea](mailto:javafx.base at 27-ea)/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
> at [javafx.base at 27-ea](mailto:javafx.base at 27-ea)/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
>
>
> or
>
>
> TooltipTest > testCssStylesheetChangeTooltip() STANDARD_ERROR
> Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "java.util.List.clear()" because "this.selectors" is null
> at [javafx.graphics at 27-internal](mailto:javafx.graphics at 27-internal)/com.sun.javafx.css.StyleMap.getCascadingStyles(StyleMap.java:148)
> at [javafx.graphics at 27-internal](mailto:javafx.graphics at 27-internal)/javafx.scene.CssStyleHelper.resetToInitialValues(CssStyleHelper.java:490)
> at [javafx.graphics at 27-internal](mailto:javafx.graphics at 27-internal)/javafx.scene.CssStyleHelper.createStyleHelper(CssSt...
I ran this on my Windows machine also for 100 iterations and the results seem good.
I noticed in a similar CI run (100 iterations of just `TooltipTest`) that one instance just barely missed the mark on one of the Tooltip show assertions:
TooltipTest > testShowDelayCssShowTooltipTwice() FAILED
org.opentest4j.AssertionFailedError: 204 <= 200 ==> expected: <true> but was: <false>
at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
at app//test.robot.javafx.scene.TooltipTest.assertTooltipShowDelay(TooltipTest.java:72)
at app//test.robot.javafx.scene.TooltipTest.testShowDelayCssShowTooltipTwice(TooltipTest.java:228)
I am wondering if we should slightly increase it? I'm not 100% sure if that would make sense though, since it is mostly just trying to chase a random hiccup which can still happen if we're less lucky...
-------------
PR Review: https://git.openjdk.org/jfx/pull/2066#pullrequestreview-3763298331
More information about the openjfx-dev
mailing list