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

IsTransactionalFalse makes invalid assumption that transaction is optimistic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • JDO 2 final (2.0)
    • None
    • tck
    • None

    Description

      The test IsTransactionalFalse.testIsTransactionalFalse mandates that an instance will be persistent-clean after a field is accessed in a transaction. However, when the transaction type is optimistic, it is also valid for the instance to be persistent-nontransactional after a field access.

      The test can be fixed by ensuring that the transaction is a datastore transaction. E.g.:

      public void testIsTransactionalFalse() {
      pm = getPM();
      Transaction tx = pm.currentTransaction();
      tx.setOptimistic(false); // make sure the transaction is not optimisitic
      tx.begin();

      Attachments

        Activity

          People

            Unassigned Unassigned
            mprudhom Marc Prud'hommeaux
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: