Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315591

Summary: JPA 2.0 Cache API Test Suite is not reentrant - refactor for generated Ids
Product: z_Archived Reporter: Michael OBrien <michael.f.obrien>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: minor    
Priority: P3 CC: eclipselink.orm-inbox, martin.grebac
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 248780    
Bug Blocks: 454799    

Description Michael OBrien CLA 2010-06-03 10:00:04 EDT
>The original CacheImplJUnitTest is not reentrant - in that it has hardcoded @Id numbers
- the result is that running the test repeatedly (in development) fails with a constraint violation on the 2nd run unless the manual id numbers are cycled before each test (or the database is cleared)

>Fix:
By it's nature the suite is evicting objects based on a specific ID - so DDL sequence generation may have issues.
However, the suite should move away from hardcoded @Id references like
e6.setId(141);
int ID_PADS = ID_TEST_BASE + 2100;
e1.setSerialNumber(new Integer(ID_PADS));

>and just get the id that is set after the first persist()
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:35:19 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink