-
Bug
-
Resolution: Fixed
-
P4
-
jfx11, 8, jfx15
On my Oracle Linux 7.7 VM I consistently get the following test failure:
$ gradle --continue --info -PFULL_TEST=true cleanTest :systemTests:test --tests test.com.sun.javafx.image.impl.ImageRaceTest
test.com.sun.javafx.image.impl.ImageRaceTest > testImageInitializationRaceCondition FAILED
java.lang.RuntimeException: Initializer Thread[ByteGrayAlpha.ToByteGrayAlphaPre Initializer,5,main] never started
at test.com.sun.javafx.image.impl.ImageRaceTest.forkAndJoinInitializers(ImageRaceTest.java:82)
at test.com.sun.javafx.image.impl.ImageRaceTest.testImageInitializationRaceCondition(ImageRaceTest.java:240)
This is due to the following fragile code in the test:
while (!ready) { yield(); }
Thread.yield is documented to be a hint and should not be used in this manner. The fix is to change Thread.yield to Thread.sleep(1) in the two places in the test it occurs.
$ gradle --continue --info -PFULL_TEST=true cleanTest :systemTests:test --tests test.com.sun.javafx.image.impl.ImageRaceTest
test.com.sun.javafx.image.impl.ImageRaceTest > testImageInitializationRaceCondition FAILED
java.lang.RuntimeException: Initializer Thread[ByteGrayAlpha.ToByteGrayAlphaPre Initializer,5,main] never started
at test.com.sun.javafx.image.impl.ImageRaceTest.forkAndJoinInitializers(ImageRaceTest.java:82)
at test.com.sun.javafx.image.impl.ImageRaceTest.testImageInitializationRaceCondition(ImageRaceTest.java:240)
This is due to the following fragile code in the test:
while (!ready) { yield(); }
Thread.yield is documented to be a hint and should not be used in this manner. The fix is to change Thread.yield to Thread.sleep(1) in the two places in the test it occurs.