Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-376

DeletePersistentFailsIfInstanceManagedByAnotherPersistenceManager - No cleanup for pm

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: JDO 2 rc1
    • Fix Version/s: JDO 2 final (2.0)
    • Component/s: tck
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        kirsh Ilan Kirsh added a comment -

        Thank you for the fix and for the clarification regarding cleanupPM.

        Show
        kirsh Ilan Kirsh added a comment - Thank you for the fix and for the clarification regarding cleanupPM.
        Hide
        mbo Michael Bouschen added a comment -

        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.

        Show
        mbo Michael Bouschen added a comment - 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.

          People

          • Assignee:
            mbo Michael Bouschen
            Reporter:
            kirsh Ilan Kirsh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development