JDO
  1. JDO
  2. JDO-513

StateTransitionsReturnedObjects expects persistent-clean in optimistic transaction

    Details

      Description

      StateTransitionsReturnedObjects fails with:

      junit.framework.AssertionFailedError:
      Assertions A5.9-1 through A5.5.8 (serialization, detachment, attachment) failed:
      StateTransitionsReturnedObjects: optimistic transaction; current state detached-clean
      makePersistent returned instance in invalid state hollow; expected state persistent-clean

      It seems that in optimistic transaction the object state should be non transactional.

        Activity

        Hide
        Andy Jefferson added a comment -

        JPOX SVN has been changed to match the moved goalposts of the TCK, now passes

        Show
        Andy Jefferson added a comment - JPOX SVN has been changed to match the moved goalposts of the TCK, now passes
        Hide
        Craig L Russell added a comment -

        The spec was updated to reflect that with an optimistic transaction, makePersistent transitions detached instances to persistent-nontransactional:

        This change now makes JPOX fail the StateTransitionsReturnedObjects test.

        Show
        Craig L Russell added a comment - The spec was updated to reflect that with an optimistic transaction, makePersistent transitions detached instances to persistent-nontransactional: This change now makes JPOX fail the StateTransitionsReturnedObjects test.
        Hide
        Craig L Russell added a comment -

        Since the spec was deficient, the branch for test case challenges should be updated to skip this test, and the trunk should be updated to check for persistent-clean for datastore transactions and persistent-nontransactional for optimistic.

        Show
        Craig L Russell added a comment - Since the spec was deficient, the branch for test case challenges should be updated to skip this test, and the trunk should be updated to check for persistent-clean for datastore transactions and persistent-nontransactional for optimistic.
        Hide
        Craig L Russell added a comment -

        The specification dated 2007-09-28 has been updated to split the row in the state transitions table so that the returned state in datastore transaction is persistent-clean but in optimistic transaction is persistent-nontransactional.

        The test case needs to be updated now.

        Show
        Craig L Russell added a comment - The specification dated 2007-09-28 has been updated to split the row in the state transitions table so that the returned state in datastore transaction is persistent-clean but in optimistic transaction is persistent-nontransactional. The test case needs to be updated now.
        Hide
        Craig L Russell added a comment -

        The specification doesn't explicitly cover this case, although I agree that the state transition should be as you indicate. The state transition table 2 near 5.8 has an entry for makePersistent but doesn't split out datastore transaction versus optimistic transaction.

        For now, we can mark this test case as UNSPECIFIED and document and fix it in maintenance (both the specification and the test case).

        Show
        Craig L Russell added a comment - The specification doesn't explicitly cover this case, although I agree that the state transition should be as you indicate. The state transition table 2 near 5.8 has an entry for makePersistent but doesn't split out datastore transaction versus optimistic transaction. For now, we can mark this test case as UNSPECIFIED and document and fix it in maintenance (both the specification and the test case).

          People

          • Assignee:
            Andy Jefferson
            Reporter:
            Ilan Kirsh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development