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
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.

Craig Russell made changes - 21/Sep/05 10:31 AM
Field Original Value New Value
Attachment jdo140patch.txt [ 12314479 ]
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.

Repository Revision Date User Message
ASF #291857 Tue Sep 27 08:26:28 UTC 2005 clr JDO-140 Add new tests for get/setRollbackOnly
Files Changed
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/transactions/GetRollbackOnlyReturnsFalseUntilSet.java
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/transactions/AfterSetRollbackOnlyCommitFails.java
MODIFY /incubator/jdo/trunk/tck20/test/conf/alltests.conf

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

Craig Russell made changes - 27/Sep/05 05:28 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Michael Bouschen added a comment - 23/Apr/06 03:08 AM
Reopened to set the Fix Version/s field to JDO 2 beta.

Michael Bouschen made changes - 23/Apr/06 03:08 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Michael Bouschen made changes - 23/Apr/06 03:10 AM
Status Reopened [ 4 ] Closed [ 6 ]
Fix Version/s JDO 2 beta [ 12310683 ]
Resolution Fixed [ 1 ]