Community
Participate
Working Groups
The test failures described in bug 301269 disappeared in eclipselink 2.1.x, so the bug 301269 has been closed, but the failures are occuring in 2.0.x branch, see detailed error messages in bug 301269 as https://bugs.eclipse.org/bugs/show_bug.cgi?id=301269 The failed tests are: testQueryPESSIMISTIC_FORCE_INCREMENTLock testVersionChangeWithReadLock testVersionChangeWithWriteLock
Tests are failing in 2.0.3 due to a test case issue - they will only pass on an extended persistence context. The tests in 2.1 and 2.2 have been corrected in revision 7250, but this was not applied to 2.0.x. Simply, test was checking version numbers from a detached entity and expecting that a later transaction would result in it changed. Outside the server, the extended persitence context meant the entity is still managed, and so the version does get correctly incremented on flushes. Simple test fix is to add employee = em.find(Employee.class, employee.getId()); before the assert so the test gets the correct value to use in the comparison.
Created attachment 183801 [details] test fix test case fix for these 3 tests.
Fix checked into 2.0.3 in revision 8559
*** Bug 320117 has been marked as a duplicate of this bug. ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink