The test test.com.sun.javafx.image.impl.ImageRaceTest is fails intermittently 
in linux

This is caused by use of Thread.yield. Thread.yield is used to tell pause the 
current thread for some time. It gives a hint to thread scheduler that the 
current thread should pause and other threads with same or higher priority 
should execute. But it is a hint only and can be ignored. so the current thread 
may very well continue to operate. This causes the test to fail on some slow 
machines.

Better approach in this scenario would be to use Thread.sleep to make the 
thread for some time for some event.

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

Commit messages:
 - 8247494: Test failure in ImageRaceTest on some systems

Changes: https://git.openjdk.java.net/jfx/pull/332/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=332&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8247494
  Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jfx/pull/332.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/332/head:pull/332

PR: https://git.openjdk.java.net/jfx/pull/332

Reply via email to