Issue Details (XML | Word | Printable)

Key: JDO-140
Type: Test Test
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Craig Russell
Reporter: Craig Russell
Votes: 0
Watchers: 0
Operations

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

Add get/setRollbackOnly tests

Created: 21/Sep/05 08:55 AM   Updated: 23/Apr/06 03:10 AM
Return to search
Component/s: tck2
Affects Version/s: None
Fix Version/s: JDO 2 beta

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works jdo140patch.txt 2005-09-21 10:31 AM Craig Russell 5 kB
Environment: TCK

Resolution Date: 23/Apr/06 03:10 AM


 Description  « Hide
There are two test classes for get/setRollbackOnly.

One test class transactions.AfterSetRollbackOnlyCommitFails tests assertion A13.4.5-1
Once a transaction has been marked for rollback via setRollbackOnly, the commit method will always fail with JDOFatalDataStoreException.
The strategy is to begin a transaction, set rollback only, and commit. The expected behavior is to catch an exception.

The second test class transactions.GetRollbackOnlyReturnsFalseUntilSet tests assertion A13.4.5-2
After a transaction is begun, getRollbackOnly will return false until set commit or rollback is called.
The strategy is to begin a transaction, test that getRollbackOnly is false, setRollbackOnly, and test that getRollbackOnly is true.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig Russell added a comment - 21/Sep/05 10:31 AM
These are the two test cases in patch format.

Michael Bouschen added a comment - 25/Sep/05 03:12 AM
I have one comment about GetRollbackOnlyReturnsFalseUntilSet:

The assertion text of A13.4.5-2 has been changed in the current version o fthe spec: "When a transaction is not active, and after a transaction is begun, getRollbackOnly will return false. Once setRollbackOnly has been called, it will return true until commit or rollback is called."

The test case implementation already covers the new version of the assertion text. I just propose to adapt the assertion text in the javadoc of the test case and in the spreadsheet.

Craig Russell added a comment - 27/Sep/05 05:28 PM
New test cases were added; alltests.conf was updated with the new tests.

Michael Bouschen added a comment - 23/Apr/06 03:08 AM
Reopened to set the Fix Version/s field to JDO 2 beta.