|
Marc Prud'hommeaux made changes - 06/Sep/06 08:25 AM
Marc Prud'hommeaux made changes - 06/Sep/06 08:27 AM
Craig Russell made changes - 02/Oct/06 08:08 PM
Craig Russell made changes - 03/Oct/06 10:53 PM
Craig Russell made changes - 04/Oct/06 09:28 PM
svn commit src/java/org/apache/jdo/tck/api/persistencemanager
Sending src/java/org/apache/jdo/tck/api/persistencemanager/DataStoreConnection.java Transmitting file data . Committed revision 453089.
Craig Russell made changes - 05/Oct/06 02:45 AM
Commit for the branch/2.0.1
svn commit -m " Sending tck20/src/java/org/apache/jdo/tck/api/persistencemanager/DataStoreConnection.java Transmitting file data . Committed revision 453090. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There are three problems with the original test case.
1. As the bug noted, the DataStoreConnection is acquired outside a transaction, and there is no guarantee that the DataStoreConnection is even valid after beginning a transaction. So I changed the code to acquire the DataStoreConnection only after beginning a transaction.
2. If the implementation supports Optimistic transactions, then the test should be repeated for both optimistic and datastore transactions.
3. The transaction is never committed. This is fixed by putting the DataStoreConnection close and the transaction.commit into the finally block.