fossable / sandpolis

Ultimate virtual estate monitoring and management!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CarouselPaneTest race condition

cilki opened this issue · comments

There's a minor race condition in CarouselPaneTest:

com.sandpolis.viewer.jfx.common.pane.CarouselPaneTest > carouselPane_3(FxRobot) FAILED
    java.lang.AssertionError: Expected: Node has child "#view1" to be false
         but: CarouselPane@238b0a12[styleClass=root]
        at org.testfx.assertions.impl.Adapter$1.matches(Adapter.java:56)
        at org.assertj.core.internal.Conditions.assertIs(Conditions.java:61)
        at org.assertj.core.api.AbstractAssert.is(AbstractAssert.java:327)
        at org.testfx.assertions.api.AbstractNodeAssert.doesNotHaveChild(AbstractNodeAssert.java:119)
        at com.sandpolis.viewer.jfx.common.pane.CarouselPaneTest.carouselPane_3(CarouselPaneTest.java:110)

The test needs to wait slightly longer than the time it takes for isMoving to return false again. In rare cases, the assertion happens before the post-animation hook runs which leads to the failure.