[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/options ...
Manik Surtani
msurtani at jboss.com
Thu Jan 11 08:49:07 EST 2007
User: msurtani
Date: 07/01/11 08:49:07
Modified: tests/functional/org/jboss/cache/options
ExplicitVersionsTest.java
CacheModeLocalSimpleTest.java
ExplicitVersionsReplTest.java
SuppressLockingTest.java FailSilentlyTest.java
ForceWriteLockTest.java
Log:
Changed CacheImpl ctor to be protected, and changed cache factories accordingly
Revision Changes Path
1.11 +6 -2 JBossCache/tests/functional/org/jboss/cache/options/ExplicitVersionsTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ExplicitVersionsTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/ExplicitVersionsTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- ExplicitVersionsTest.java 10 Jan 2007 19:53:41 -0000 1.10
+++ ExplicitVersionsTest.java 11 Jan 2007 13:49:07 -0000 1.11
@@ -9,6 +9,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
import org.jboss.cache.CacheImpl;
+import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Configuration;
@@ -34,7 +35,7 @@
protected void setUp() throws Exception
{
if (cache != null) tearDown();
- cache = new CacheImpl();
+ cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
cache.getConfiguration().setNodeLockingScheme("OPTIMISTIC");
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
@@ -164,7 +165,10 @@
int otherInt = Integer.parseInt(((TestVersion) other).getInternalVersion());
return myInt > otherInt;
}
- else throw new IllegalArgumentException("version type mismatch");
+ else
+ {
+ throw new IllegalArgumentException("version type mismatch");
+ }
}
1.7 +3 -2 JBossCache/tests/functional/org/jboss/cache/options/CacheModeLocalSimpleTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheModeLocalSimpleTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/CacheModeLocalSimpleTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- CacheModeLocalSimpleTest.java 30 Dec 2006 17:49:54 -0000 1.6
+++ CacheModeLocalSimpleTest.java 11 Jan 2007 13:49:07 -0000 1.7
@@ -8,6 +8,7 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheImpl;
+import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Option;
@@ -24,13 +25,13 @@
public void setUp() throws Exception
{
- cache1 = new CacheImpl();
+ cache1 = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
Configuration c = new Configuration();
cache1.setConfiguration(c);
c.setCacheMode("REPL_SYNC");
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
- cache2 = new CacheImpl();
+ cache2 = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
c = new Configuration();
cache2.setConfiguration(c);
c.setCacheMode("REPL_SYNC");
1.8 +2 -1 JBossCache/tests/functional/org/jboss/cache/options/ExplicitVersionsReplTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ExplicitVersionsReplTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/ExplicitVersionsReplTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- ExplicitVersionsReplTest.java 10 Jan 2007 19:53:41 -0000 1.7
+++ ExplicitVersionsReplTest.java 11 Jan 2007 13:49:07 -0000 1.8
@@ -3,6 +3,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
import org.jboss.cache.CacheImpl;
+import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Configuration;
@@ -35,7 +36,7 @@
private CacheImpl createCache() throws Exception
{
- CacheImpl cache = new CacheImpl();
+ CacheImpl cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
Configuration c = cache.getConfiguration();
c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
c.setNodeLockingScheme("OPTIMISTIC");
1.11 +1 -1 JBossCache/tests/functional/org/jboss/cache/options/SuppressLockingTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SuppressLockingTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/SuppressLockingTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- SuppressLockingTest.java 2 Jan 2007 18:26:07 -0000 1.10
+++ SuppressLockingTest.java 11 Jan 2007 13:49:07 -0000 1.11
@@ -8,10 +8,10 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheImpl;
+import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.DummyTransactionManagerLookup;
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.factories.DefaultCacheFactory;
import javax.transaction.TransactionManager;
import java.util.HashMap;
1.8 +3 -2 JBossCache/tests/functional/org/jboss/cache/options/FailSilentlyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: FailSilentlyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/FailSilentlyTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- FailSilentlyTest.java 30 Dec 2006 17:49:54 -0000 1.7
+++ FailSilentlyTest.java 11 Jan 2007 13:49:07 -0000 1.8
@@ -8,6 +8,7 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheImpl;
+import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
@@ -32,7 +33,7 @@
protected void setUp() throws Exception
{
if (cache != null) tearDown();
- cache = new CacheImpl();
+ cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
// very short acquisition timeout
cache.getConfiguration().setLockAcquisitionTimeout(100);
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
@@ -142,7 +143,7 @@
public void testPutThatWillFail() throws Exception
{
manager.begin();
- cache.put(fqn, "k", "v"); // this will get WLs on / and /a
+ cache.put(fqn, "k", "v");// this will get WLs on / and /a
tx = manager.suspend();
assertEquals(2, cache.getNumberOfLocksHeld());
1.2 +1 -1 JBossCache/tests/functional/org/jboss/cache/options/ForceWriteLockTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ForceWriteLockTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/ForceWriteLockTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ForceWriteLockTest.java 10 Jan 2007 17:47:22 -0000 1.1
+++ ForceWriteLockTest.java 11 Jan 2007 13:49:07 -0000 1.2
@@ -2,10 +2,10 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheSPI;
+import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.factories.DefaultCacheFactory;
import org.jboss.cache.lock.NodeLock;
import javax.transaction.TransactionManager;
More information about the jboss-cvs-commits
mailing list