Issue Details (XML | Word | Printable)

Key: JDO-376
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Michael Bouschen
Reporter: Ilan Kirsh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

DeletePersistentFailsIfInstanceManagedByAnotherPersistenceManager - No cleanup for pm

Created: 30/Apr/06 11:59 AM   Updated: 30/Apr/06 09:06 PM
Return to search
Component/s: tck2
Affects Version/s: JDO 2 rc1
Fix Version/s: JDO 2 final

Time Tracking:
Not Specified

Resolution Date: 30/Apr/06 08:52 PM


 Description  « Hide
In org.apache.jdo.tck.api.persistencemanager.DeletePersistentFailsIfInstanceManagedByAnotherPersistenceManager, Line 77: It should be pm2 instead of pm, otherwise cleanup of pm is skipped and a following test may fail. For instance running org.apache.jdo.tck.query.api.Close after DeletePersistentFailsIfInstanceManagedByAnotherPersistenceManager fails, because the old PCPoint instances are still there.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #398346 Sun Apr 30 13:46:53 UTC 2006 mbo JDO-376: need to call closePM on correct pm instance
Files Changed
MODIFY /db/jdo/branches/2.0/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/DeletePersistentFailsIfInstanceManagedByAnotherPersistenceManager.java
MODIFY /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/DeletePersistentFailsIfInstanceManagedByAnotherPersistenceManager.java

Michael Bouschen made changes - 30/Apr/06 08:43 PM
Field Original Value New Value
Affects Version/s JDO 2 rc1 [ 12310771 ]
Assignee Michael Bouschen [ mbo ]
Fix Version/s JDO 2 final [ 12310830 ]
Michael Bouschen added a comment - 30/Apr/06 08:52 PM
Thanks Ilan for catching this. I fixed this in the trunk and into the 2.0 branch (see revision 398346).

The name cleanupPM might be misleadinng, because the method does not clean up the database. It simply checks whether the transaction bound to the pm is still open and if yes calls rollback. Then it closes the pm. The database cleanup is done as part of method localTearDown implemented in the JDO_Test superclass and it will open a new new pm instance.

Michael Bouschen made changes - 30/Apr/06 08:52 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Ilan Kirsh added a comment - 30/Apr/06 09:06 PM
Thank you for the fix and for the clarification regarding cleanupPM.