[jbosscache-commits] JBoss Cache SVN: r4638 - core/trunk/src/test/java/org/jboss/cache/optimistic.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Oct 17 15:18:52 EDT 2007


Author: bstansberry at jboss.com
Date: 2007-10-17 15:18:52 -0400 (Wed, 17 Oct 2007)
New Revision: 4638

Modified:
   core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java
Log:
[JBCACHE-1201] Add test of SyncCommitPhase=false

Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java	2007-10-17 18:55:32 UTC (rev 4637)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java	2007-10-17 19:18:52 UTC (rev 4638)
@@ -203,6 +203,11 @@
 
    protected CacheImpl<Object, Object> createReplicatedCache(String name, Configuration.CacheMode mode) throws Exception
    {
+      return createReplicatedCache(name, mode, true);
+   }
+   
+   protected CacheImpl<Object, Object> createReplicatedCache(String name, Configuration.CacheMode mode, boolean start) throws Exception
+   {  
       CacheImpl<Object, Object> cache = (CacheImpl<Object, Object>) DefaultCacheFactory.getInstance().createCache(false);
       Configuration c = new Configuration();
       cache.setConfiguration(c);
@@ -219,8 +224,12 @@
       }
       c.setNodeLockingScheme("OPTIMISTIC");
       c.setTransactionManagerLookupClass(TransactionSetup.getManagerLookup());
-      cache.create();
-      cache.start();
+      
+      if (start)
+      {
+         cache.create();
+         cache.start();
+      }
 
       return cache;
    }




More information about the jbosscache-commits mailing list