On Thu, 22 Oct 2020 12:29:51 GMT, Pankaj Bansal <pban...@openjdk.org> wrote:

> 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 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 wait for some time for some event.

On my Oracle Linux 7.7 VM, the current test fails always. With your fix I ran 
100 iterations of the test with 0 failures.

+1

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

Marked as reviewed by kcr (Lead).

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

Reply via email to