Bug 259976 - JPA TEST CASES NOT TO VERIFY OBJECT THAT WERE WRITTEN
Summary: JPA TEST CASES NOT TO VERIFY OBJECT THAT WERE WRITTEN
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-01-05 12:20 EST by Kevin Yuan CLA
Modified: 2022-06-09 10:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Yuan CLA 2009-01-05 12:20:13 EST
This bug is originated from a bug for TopLink in Oracle bug base. 
(James Sutherland)
None of our JPA tests verify what was written (inserted/updated) was actually
 persisted correctly to the database.  They only verify that no errors
 occurred.
 At the end of any create/update test the test should clear the cache and
 re-read the object and compare it with what was written.  This should be made
 into a generic method on JUnitTestCase so the tests only need to call this.
 i.e.
 verifyObject(object)
 - clearCache
 - readObject
 - session.compareObjects
 Ideally the compareObjects method would be updated to include comparison to
 casacaded mappings (i.e. private and cascade persist).
 Also verifyDelete should also be done for deleted objects, and updated to
 check cascaded mappings.

A verifyObject method was added, but it is only used in a couple new tests.
 - existing tests that insert/update must use verify
 - need a verifyDelete for delete tests
 - verify needs to cascade by mapping
Comment 1 Peter Krogh CLA 2009-11-27 13:40:59 EST
This bug fix did not make the cut off for 2.0.0. We are deferring the bugs to Future where we can properly sort them all together based on community votes and severity. We will then assign them accordingly to future patch sets and releases.
Comment 2 Peter Krogh CLA 2009-11-30 11:36:06 EST
Changing the priority of the bugs that have been recently triaged to future.  Targetting them to P2 will differentiate them from the P3s that have been triaged into future earlier.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:14:02 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:30:49 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink