JDO
  1. JDO
  2. JDO-259

Write tests for new persistent-nontransactional-dirty behavior assertions

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JDO 2 beta
    • Fix Version/s: JDO 2 final (2.0)
    • Component/s: tck
    • Labels:
      None

      Description

      A5.6.2-4 [If a datastore transaction is begun, commit will write the changes to the datastore with no checking as to the current state of the instances in the datastore. That is, the changes made outside the transaction together with any changes made inside the transaction will overwrite the current state of the datastore.]

      A5.6.2-6 [If a datastore transaction is begun, rollback will not write any changes to the datastore.]

      A5.6.2-8 [If an optimistic transaction is begun, commit will write the changes to the datastore after checking as to the current state of the instances in the datastore. The changes made outside the transaction together with any changes made inside the transaction will update the current state of the datastore if the version checking is successful.]

      A5.6.2-10 [If an optimistic transaction is begun, rollback will not write any changes to the datastore. The persistent-nontransactional-dirty instances will transition according to the RestoreValues flag. ]

      1. NontransactionalWriteDatastoreCommit.java
        3 kB
        Craig L Russell
      2. NontransactionalWriteDatastoreCommitConflict.java
        3 kB
        Craig L Russell
      3. NontransactionalWriteDatastoreRollback.java
        3 kB
        Craig L Russell
      4. NontransactionalWriteOptimisticCommit.java
        3 kB
        Craig L Russell
      5. NontransactionalWriteOptimisticCommitConflict.java
        3 kB
        Craig L Russell
      6. NontransactionalWriteOptimisticRollback.java
        3 kB
        Craig L Russell
      7. NontransactionalWriteTest.java
        7 kB
        Craig L Russell
      8. NontransactionalWriteThrows.java
        3 kB
        Craig L Russell

        Activity

        Andy Jefferson made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Craig L Russell made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        Craig L Russell added a comment -

        svn commit -m "JDO-259 Added new NontransactionalWrite tests; removed the old test" src/java/org/apache/jdo/tck/lifecycle/NontransactionalWrite* src/java/org/apache/jdo/tck/lifecycle/nontransactional src/java/org/apache/jdo/tck/lifecycle/nontransactional/ModificationOfNontransactionalInstanceOutsideTransaction.java src/conf/lifecycle.conf
        Sending src/conf/lifecycle.conf
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteDatastoreCommit.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteDatastoreCommitConflict.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteDatastoreRollback.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteOptimisticCommit.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteOptimisticCommitConflict.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteOptimisticRollback.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteTest.java
        Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteThrows.java
        Deleting src/java/org/apache/jdo/tck/lifecycle/nontransactional
        Transmitting file data .........
        Committed revision 386502.

        Show
        Craig L Russell added a comment - svn commit -m " JDO-259 Added new NontransactionalWrite tests; removed the old test" src/java/org/apache/jdo/tck/lifecycle/NontransactionalWrite* src/java/org/apache/jdo/tck/lifecycle/nontransactional src/java/org/apache/jdo/tck/lifecycle/nontransactional/ModificationOfNontransactionalInstanceOutsideTransaction.java src/conf/lifecycle.conf Sending src/conf/lifecycle.conf Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteDatastoreCommit.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteDatastoreCommitConflict.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteDatastoreRollback.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteOptimisticCommit.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteOptimisticCommitConflict.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteOptimisticRollback.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteTest.java Adding src/java/org/apache/jdo/tck/lifecycle/NontransactionalWriteThrows.java Deleting src/java/org/apache/jdo/tck/lifecycle/nontransactional Transmitting file data ......... Committed revision 386502.
        Craig L Russell made changes -
        Craig L Russell made changes -
        Craig L Russell made changes -
        Attachment NontransactionalWriteTest.java [ 12324122 ]
        Attachment NontransactionalWriteDatastoreCommit.java [ 12324124 ]
        Attachment NontransactionalWriteThrows.java [ 12324123 ]
        Hide
        Craig L Russell added a comment -

        These tests run on JPOX, but JPOX doesn't support NontransactionalWrite. In case there is an issue with one of the tests, I've split the tests into multiple test classes.

        Show
        Craig L Russell added a comment - These tests run on JPOX, but JPOX doesn't support NontransactionalWrite. In case there is an issue with one of the tests, I've split the tests into multiple test classes.
        Hide
        Craig L Russell added a comment -

        The existing test org.apache.jdo.tck.lifecycle.nontransactionalModificationOfNontransactionalInstanceOutsideTransaction checks the assertion from JDO1:

        • With <code>NontransactionalWrite</code> set to <code>true</code>,
        • modification of nontransactional persistent instances is permitted outside
        • a transaction. The changes do not participate in any subsequent transaction.

        This test will be modified for JDO2.

        Show
        Craig L Russell added a comment - The existing test org.apache.jdo.tck.lifecycle.nontransactionalModificationOfNontransactionalInstanceOutsideTransaction checks the assertion from JDO1: With <code>NontransactionalWrite</code> set to <code>true</code>, modification of nontransactional persistent instances is permitted outside a transaction. The changes do not participate in any subsequent transaction. This test will be modified for JDO2.
        Craig L Russell made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        Craig L Russell made changes -
        Assignee Craig Russell [ clr ]
        Craig L Russell made changes -
        Fix Version/s JDO 2 final [ 12310830 ]
        Fix Version/s JDO 2 rc1 [ 12310771 ]
        Craig L Russell made changes -
        Type New Feature [ 2 ] Test [ 6 ]
        Craig L Russell made changes -
        Affects Version/s JDO 2 beta [ 12310683 ]
        Fix Version/s JDO 2 rc1 [ 12310771 ]
        Craig L Russell made changes -
        Assignee Matthew T. Adams [ matthewadams ]
        Michael Bouschen made changes -
        Summary Write tests for attach/detach behavior assertions Write tests for new persistent-nontransactional-dirty behavior assertions
        Michael Bouschen made changes -
        Resolution Won't Fix [ 2 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Michael Bouschen added a comment -

        Reopened.
        The title is misleading: it talks about detach/attach where the issue is about persistent-nontransactional-dirty.

        Show
        Michael Bouschen added a comment - Reopened. The title is misleading: it talks about detach/attach where the issue is about persistent-nontransactional-dirty.
        Matthew T. Adams made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Hide
        Matthew T. Adams added a comment -

        As per previous comment.

        Show
        Matthew T. Adams added a comment - As per previous comment.
        Hide
        Matthew T. Adams added a comment -

        I'm not sure that I see how these assertions have anything to do with attach/detach behaviors. They appear to be more related to the persistent-nontransactional-dirty state. The sections directly relevant to attach/detach are "5.5.8 Detached-clean", "5.5.9 Detached-dirty", and "12.6.8 Detaching and attaching instances".

        I'll resolve this issue as "won't fix" and create a new issue for the sections listed above.

        Show
        Matthew T. Adams added a comment - I'm not sure that I see how these assertions have anything to do with attach/detach behaviors. They appear to be more related to the persistent-nontransactional-dirty state. The sections directly relevant to attach/detach are "5.5.8 Detached-clean", "5.5.9 Detached-dirty", and "12.6.8 Detaching and attaching instances". I'll resolve this issue as "won't fix" and create a new issue for the sections listed above.
        Matthew T. Adams made changes -
        Field Original Value New Value
        Assignee Matthew T. Adams [ matthewadams ]
        Michelle Caisse created issue -

          People

          • Assignee:
            Craig L Russell
            Reporter:
            Michelle Caisse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development