[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader ...
Manik Surtani
msurtani at jboss.com
Thu Nov 30 09:18:04 EST 2006
User: msurtani
Date: 06/11/30 09:18:04
Modified: tests/functional/org/jboss/cache/loader Tag:
Branch_JBossCache_1_3_0
CacheLoaderWithReplicationTest.java
TxCacheLoaderTest.java
Log:
wc
Revision Changes Path
No revision
No revision
1.16.2.2 +5 -0 JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderWithReplicationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -u -b -r1.16.2.1 -r1.16.2.2
--- CacheLoaderWithReplicationTest.java 8 May 2006 19:33:39 -0000 1.16.2.1
+++ CacheLoaderWithReplicationTest.java 30 Nov 2006 14:18:04 -0000 1.16.2.2
@@ -15,6 +15,7 @@
import org.apache.commons.logging.LogFactory;
import javax.transaction.TransactionManager;
+import javax.transaction.Transaction;
import java.io.File;
/**
@@ -104,7 +105,9 @@
cache1.put(fqn, key, "value");
Assert.assertEquals("value", cache1.get(fqn, key));
+ Transaction tx = mgr.suspend();
Assert.assertNull(cache2.get(fqn, key));
+ mgr.resume(tx);
Assert.assertNull(loader1.get(fqn));
Assert.assertNull(loader2.get(fqn));
mgr.commit();
@@ -118,7 +121,9 @@
cache1.put(fqn, key, "value2");
Assert.assertEquals("value2", cache1.get(fqn, key));
+ tx = mgr.suspend();
Assert.assertEquals("value", cache2.get(fqn, key));
+ mgr.resume(tx);
Assert.assertEquals("value", loader1.get(fqn).get(key));
Assert.assertEquals("value", loader2.get(fqn).get(key));
1.2.2.1 +4 -1 JBossCache/tests/functional/org/jboss/cache/loader/TxCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TxCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/TxCacheLoaderTest.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -b -r1.2 -r1.2.2.1
--- TxCacheLoaderTest.java 17 Jan 2006 13:49:13 -0000 1.2
+++ TxCacheLoaderTest.java 30 Nov 2006 14:18:04 -0000 1.2.2.1
@@ -15,7 +15,7 @@
/**
* @author Bela Ban
- * @version $Id: TxCacheLoaderTest.java,v 1.2 2006/01/17 13:49:13 bela Exp $
+ * @version $Id: TxCacheLoaderTest.java,v 1.2.2.1 2006/11/30 14:18:04 msurtani Exp $
*/
public class TxCacheLoaderTest extends TestCase {
TreeCache cache1, cache2;
@@ -52,14 +52,17 @@
public void testTxPutCommit() throws Exception, NotSupportedException {
DummyTransactionManager mgr=DummyTransactionManager.getInstance();
+
mgr.begin();
Transaction tx=mgr.getTransaction();
cache1.put("/one/two/three", "key1", "val1");
cache1.put("/one/two/three/four", "key2", "val2");
+ mgr.suspend();
assertNull(cache2.get("/one/two/three", "key1"));
assertNull(cache2.get("/one/two/three/four", "key2"));
+ mgr.resume(tx);
tx.commit();
assertNotNull(cache1.getKeys("/one/two/three"));
Set children=cache1.getChildrenNames("/one");
More information about the jboss-cvs-commits
mailing list