You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Elena Semukhina <el...@gmail.com> on 2006/11/28 13:40:02 UTC

[drlvm][kernel test] the test for Thread.yield() is not quite correct

I ran kernel tests iteratively and saw intermittent failures of
ThreadTest.testYield() on linux.
Despite the test always passes on Windows, I think the test is not quite
correct: it expects that the two threads run alternately but actually any
other thread can run while some thread yields. This happens with high
probability during the test run in batch mode. I created
https://issues.apache.org/jira/browse/HARMONY-2343 describing the issue and
suggested the fix.

What is interesting: I attached a test to JIRA issue which is an exact test
case testYield() from the current ThreadTest. It never fails on drlvm (at
least I have not seen a failure)  but always fails on RI 1.5.0_08.

Does anyone have some thoughts about Thread.yield() to share? Is the fix
acceptable?

-- 
Thanks,
Elena