[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/transaction ...
Ben Wang
bwang at jboss.com
Sat Sep 16 06:38:56 EDT 2006
User: bwang
Date: 06/09/16 06:38:56
Modified: tests/functional/org/jboss/cache/transaction
TransactionTest.java
Log:
Updated.
Revision Changes Path
1.15 +24 -2 JBossCache/tests/functional/org/jboss/cache/transaction/TransactionTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TransactionTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/transaction/TransactionTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- TransactionTest.java 15 Sep 2006 15:11:35 -0000 1.14
+++ TransactionTest.java 16 Sep 2006 10:38:56 -0000 1.15
@@ -37,7 +37,7 @@
* Tests transactional access to a local TreeCache.
* Note: we use DummpyTranasctionManager to replace jta
*
- * @version $Id: TransactionTest.java,v 1.14 2006/09/15 15:11:35 msurtani Exp $
+ * @version $Id: TransactionTest.java,v 1.15 2006/09/16 10:38:56 bwang Exp $
*/
public class TransactionTest extends TestCase
{
@@ -152,6 +152,28 @@
}
+ public void testRollbackTx()
+ {
+ try
+ {
+ cache.put("/a/b/c", "age", new Integer(38));
+ assertNotNull(cache.get("/a/b/c", "age"));
+ tx.begin();
+ cache.remove("/a/b/c");
+ tx.rollback();
+
+ // This test is done outside the TX, it wouldn't work if someone else
+ // modified "age". This works because we're the only TX running.
+ assertNotNull(cache.get("/a/b/c", "age"));
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ fail(t.toString());
+ }
+ }
+
+
public void testRollbackTx2()
{
try
More information about the jboss-cvs-commits
mailing list