Author: manik.surtani(a)jboss.com
Date: 2008-07-03 11:04:40 -0400 (Thu, 03 Jul 2008)
New Revision: 6162
Modified:
core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java
Log:
Sync commit and rollback phases
Modified: core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java 2008-07-03 14:40:16
UTC (rev 6161)
+++ core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java 2008-07-03 15:04:40
UTC (rev 6162)
@@ -44,20 +44,23 @@
protected NodeLockingScheme nodeLockingScheme = NodeLockingScheme.PESSIMISTIC;
@BeforeMethod(alwaysRun = true)
- public void setUp()
+ public void setUp() throws CloneNotSupportedException
{
System.out.println("*** In setUp()");
caches = new ArrayList<CacheSPI<Object, Object>>();
CacheSPI<Object, Object> cache1 = (CacheSPI<Object, Object>) new
DefaultCacheFactory<Object,
Object>().createCache(UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC),
false);
- CacheSPI<Object, Object> cache2 = (CacheSPI<Object, Object>) new
DefaultCacheFactory<Object,
Object>().createCache(UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC),
false);
cache1.getConfiguration().setNodeLockingScheme(nodeLockingScheme);
- cache2.getConfiguration().setNodeLockingScheme(nodeLockingScheme);
+ cache1.getConfiguration().setSyncCommitPhase(true);
+ cache1.getConfiguration().setSyncRollbackPhase(true);
+ cache1.getConfiguration().setFetchInMemoryState(false);
configure(cache1.getConfiguration());
- configure(cache2.getConfiguration());
cache1.start();
+
+ CacheSPI<Object, Object> cache2 = (CacheSPI<Object, Object>) new
DefaultCacheFactory<Object, Object>().createCache(cache1.getConfiguration().clone(),
false);
+
cache2.start();
caches.add(cache1);
Show replies by date