[jbosscache-commits] JBoss Cache SVN: r7031 - core/trunk/src/test/java/org/jboss/cache/passivation.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Wed Oct 29 21:39:47 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-10-29 21:39:47 -0400 (Wed, 29 Oct 2008)
New Revision: 7031
Modified:
core/trunk/src/test/java/org/jboss/cache/passivation/ReplAndStateTransferWithPassivationTest.java
Log:
better tests
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/ReplAndStateTransferWithPassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/ReplAndStateTransferWithPassivationTest.java 2008-10-29 19:35:43 UTC (rev 7030)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/ReplAndStateTransferWithPassivationTest.java 2008-10-30 01:39:47 UTC (rev 7031)
@@ -74,6 +74,17 @@
doTest(NodeLockingScheme.PESSIMISTIC, true);
}
+ public void testStateTransferOfPassivatedPartialStateBRForceRemote() throws Exception
+ {
+ doTest(NodeLockingScheme.MVCC, false);
+ }
+
+ public void testStateTransferOfPassivatedPartialStateBRPessimisticForceRemote() throws Exception
+ {
+ doTest(NodeLockingScheme.PESSIMISTIC, false);
+ }
+
+
private void doPartialStateTransferTest(NodeLockingScheme nls) throws Exception
{
CacheSPI cache1=null, cache2=null;
@@ -85,8 +96,8 @@
nameSet.add("b");
nameSet.add("c");
- cache1 = (CacheSPI) new UnitTestCacheFactory().createCache(buildConf(nls, "cache1", true, false));
- cache2 = (CacheSPI) new UnitTestCacheFactory().createCache(buildConf(nls, "cache2", true, false));
+ cache1 = (CacheSPI) new UnitTestCacheFactory().createCache(buildConf(nls, "cache1", true, false, true));
+ cache2 = (CacheSPI) new UnitTestCacheFactory().createCache(buildConf(nls, "cache2", true, false, true));
Region r1 = cache1.getRegionManager().getRegion(subtree, true);
Region r2 = cache2.getRegionManager().getRegion(subtree, true);
@@ -126,7 +137,7 @@
nameSet.add(B.getLastElement());
nameSet.add(C.getLastElement());
- cache1 = new UnitTestCacheFactory().createCache(buildConf(nls, "cache1", false, useBR));
+ cache1 = new UnitTestCacheFactory().createCache(buildConf(nls, "cache1", false, useBR, true));
cache1.put(A, "k", "v");
cache1.put(B, "k", "v");
@@ -135,7 +146,7 @@
cache1.evict(A);
- cache2 = new UnitTestCacheFactory().createCache(buildConf(nls, "cache2", false, useBR));
+ cache2 = new UnitTestCacheFactory().createCache(buildConf(nls, "cache2", false, useBR, true));
if (useBR)
{
Set backupNameSet = new HashSet(nameSet);
@@ -155,7 +166,7 @@
}
}
- private Configuration buildConf(NodeLockingScheme nls, String n, boolean regionbased, boolean useBR) throws Exception
+ private Configuration buildConf(NodeLockingScheme nls, String n, boolean regionbased, boolean useBR, boolean brSearchSubtrees) throws Exception
{
Configuration c = new Configuration();
if (regionbased)
@@ -173,7 +184,7 @@
BuddyReplicationConfig brc = new BuddyReplicationConfig();
brc.setEnabled(true);
brc.setAutoDataGravitation(false);
- brc.setDataGravitationSearchBackupTrees(true);
+ brc.setDataGravitationSearchBackupTrees(brSearchSubtrees);
brc.setDataGravitationRemoveOnFind(true);
c.setBuddyReplicationConfig(brc);
}
More information about the jbosscache-commits
mailing list