Community
Participate
Working Groups
org.eclipse.core.runtime.AssertionFailedException: assertion failed: Result is not ok: Status ERROR: org.eclipse.core.jobs code=2 An internal error occurred during: "Yielding". org.eclipse.core.runtime.AssertionFailedException: assertion failed: at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110) at org.eclipse.core.tests.runtime.jobs.YieldTest.testYieldJobToJob(YieldTest.java:160)
This is a timing problem in the test itself. The yielding job asserts that the blocked job is already waiting when the yielding job starts to run. It's possible that the blocked job hasn't even been added to the wait queue yet at this point. The assertion isn't particularly important to the test - it also asserts that the blocked job has a null result which is a useful enough test. The same timing problem is found in YieldTest.testThreadRestored. Also, this test was using runtime's Assert rather than JUnit's Assert, which resulted in the test showing up as an "error" rather than a "failure".
Created attachment 152794 [details] Fixes two timing problems and switch to JUnit assert
Created attachment 152795 [details] Fixes two timing problems and switch to JUnit assert Previous was wrong patch.
Fixed in HEAD.