[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/options ...
Manik Surtani
msurtani at jboss.com
Wed Sep 6 11:31:00 EDT 2006
User: msurtani
Date: 06/09/06 11:31:00
Modified: tests/functional/org/jboss/cache/options
CacheModeLocalSimpleTest.java
ExplicitVersionsTest.java FailSilentlyTest.java
Log:
Removed TreeCache dependency on ServiceMBeanSupport
Revision Changes Path
1.4 +4 -4 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.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- CacheModeLocalSimpleTest.java 30 Aug 2006 19:09:57 -0000 1.3
+++ CacheModeLocalSimpleTest.java 6 Sep 2006 15:31:00 -0000 1.4
@@ -36,8 +36,8 @@
c.setCacheMode("REPL_SYNC");
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
- cache1.startService();
- cache2.startService();
+ cache1.start();
+ cache2.start();
cacheModeLocal = new Option();
cacheModeLocal.setCacheModeLocal(true);
@@ -47,13 +47,13 @@
{
if (cache1 != null)
{
- cache1.stopService();
+ cache1.stop();
cache1 = null;
}
if (cache2 != null)
{
- cache2.stopService();
+ cache2.stop();
cache2 = null;
}
}
1.5 +114 -114 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.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ExplicitVersionsTest.java 20 Jul 2006 10:54:01 -0000 1.4
+++ ExplicitVersionsTest.java 6 Sep 2006 15:31:00 -0000 1.5
@@ -6,13 +6,13 @@
*/
package org.jboss.cache.options;
-import junit.framework.TestCase;
import junit.framework.Assert;
-import org.jboss.cache.TreeCache;
+import junit.framework.TestCase;
import org.jboss.cache.Fqn;
import org.jboss.cache.OptimisticTreeNode;
-import org.jboss.cache.config.Option;
+import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Option;
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.optimistic.DefaultDataVersion;
@@ -35,17 +35,17 @@
{
if (cache != null) tearDown();
cache = new TreeCache();
- cache.getConfiguration().setCacheMode( Configuration.CacheMode.LOCAL );
+ cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
cache.getConfiguration().setNodeLockingScheme("OPTIMISTIC");
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
- cache.startService();
+ cache.start();
}
protected void tearDown()
{
if (cache != null)
{
- cache.stopService();
+ cache.stop();
cache = null;
}
}
@@ -53,11 +53,11 @@
public void testSimplePut() throws Exception
{
DataVersion version = new TestVersion("99");
- option.setDataVersion( version );
+ option.setDataVersion(version);
cache.put(fqn, key, "value", option);
//now retrieve the data from the cache.
- Assert.assertEquals("value", cache.get(fqn,key));
+ Assert.assertEquals("value", cache.get(fqn, key));
// get a hold of the node
OptimisticTreeNode node = (OptimisticTreeNode) cache.get(fqn);
@@ -137,8 +137,8 @@
{
if (other instanceof TestVersion)
{
- int myInt = Integer.parseInt( myVersion );
- int otherInt = Integer.parseInt( ((TestVersion) other).getInternalVersion() );
+ int myInt = Integer.parseInt(myVersion);
+ int otherInt = Integer.parseInt(((TestVersion) other).getInternalVersion());
return myInt > otherInt;
}
else throw new IllegalArgumentException("version type mismatch");
1.4 +208 -209 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.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- FailSilentlyTest.java 20 Jul 2006 09:03:54 -0000 1.3
+++ FailSilentlyTest.java 6 Sep 2006 15:31:00 -0000 1.4
@@ -7,15 +7,15 @@
package org.jboss.cache.options;
import junit.framework.TestCase;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.Fqn;
-import org.jboss.cache.config.Option;
+import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Option;
-import javax.transaction.TransactionManager;
import javax.transaction.Transaction;
-import java.util.Map;
+import javax.transaction.TransactionManager;
import java.util.HashMap;
+import java.util.Map;
/**
* Tests passing in the failSilently option in various scenarios.
@@ -39,18 +39,18 @@
cache.getConfiguration().setLockAcquisitionTimeout(100);
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
- cache.startService();
+ cache.start();
manager = cache.getTransactionManager();
failSilently = new Option();
- failSilently.setFailSilently( true );
+ failSilently.setFailSilently(true);
}
protected void tearDown()
{
if (cache != null)
{
- cache.stopService();
+ cache.stop();
cache = null;
}
}
@@ -104,7 +104,6 @@
}
-
public void testRemoveNode() throws Exception
{
try
More information about the jboss-cvs-commits
mailing list