JDO
  1. JDO
  2. JDO-409

IsTransactionalFalse makes invalid assumption that transaction is optimistic

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: JDO 2 final (2.0)
    • Fix Version/s: None
    • Component/s: tck
    • Labels:
      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();

        Activity

        Hide
        Ilan Kirsh added a comment -

        I believe the title should be "IsTransactionalFalse makes invalid assumption that transaction is datastore" and that this issue duplicates JDO-400 that had already been fixed.

        Show
        Ilan Kirsh added a comment - I believe the title should be "IsTransactionalFalse makes invalid assumption that transaction is datastore" and that this issue duplicates JDO-400 that had already been fixed.
        Hide
        Marc Prud'hommeaux added a comment -

        You are correct about the title, and I agree that it is a duplicate. The fixed check in at http://svn.apache.org/repos/asf/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/jdohelper/IsTransactionalFalse.java looks correct to me.

        Show
        Marc Prud'hommeaux added a comment - You are correct about the title, and I agree that it is a duplicate. The fixed check in at http://svn.apache.org/repos/asf/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/jdohelper/IsTransactionalFalse.java looks correct to me.
        Hide
        Michael Bouschen added a comment -

        Closed as a duplicate of JDO-400.

        Show
        Michael Bouschen added a comment - Closed as a duplicate of JDO-400 .

          People

          • Assignee:
            Unassigned
            Reporter:
            Marc Prud'hommeaux
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development