Issue Details (XML | Word | Printable)

Key: JDO-513
Type: Test Test
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Ilan Kirsh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

StateTransitionsReturnedObjects expects persistent-clean in optimistic transaction

Created: 09/Aug/07 12:29 PM   Updated: 09/Dec/07 09:52 AM
Return to search
Component/s: tck2
Affects Version/s: None
Fix Version/s: JDO 2 maintenance release 1

Time Tracking:
Not Specified

Resolution Date: 09/Dec/07 09:52 AM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig Russell added a comment - 28/Sep/07 10:34 PM
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).

Craig Russell added a comment - 05/Oct/07 06:18 PM
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.

Craig Russell added a comment - 05/Oct/07 06:19 PM
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.

Craig Russell added a comment - 07/Dec/07 10:31 PM

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.


Andy Jefferson added a comment - 09/Dec/07 09:52 AM
JPOX SVN has been changed to match the moved goalposts of the TCK, now passes