[jboss-cvs] JBossCache/tests/perf/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 06:32:23 EDT 2006
User: msurtani
Date: 06/07/20 06:32:23
Modified: tests/perf/org/jboss/cache FieldUpdateEmulator.java
ReplicatedAsyncMapPerfTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.4 +1 -1 JBossCache/tests/perf/org/jboss/cache/FieldUpdateEmulator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: FieldUpdateEmulator.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/FieldUpdateEmulator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- FieldUpdateEmulator.java 18 Jul 2006 10:50:47 -0000 1.3
+++ FieldUpdateEmulator.java 20 Jul 2006 10:32:22 -0000 1.4
@@ -62,7 +62,7 @@
throw new RuntimeException("Cache config xml is not specified.");
}
config.configure(cache_, file); // read in generic replAsync xml
- cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
}
void destroyCache() throws Exception {
1.3 +6 -7 JBossCache/tests/perf/org/jboss/cache/ReplicatedAsyncMapPerfTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicatedAsyncMapPerfTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/ReplicatedAsyncMapPerfTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ReplicatedAsyncMapPerfTest.java 31 May 2006 14:08:39 -0000 1.2
+++ ReplicatedAsyncMapPerfTest.java 20 Jul 2006 10:32:22 -0000 1.3
@@ -12,8 +12,7 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.jboss.cache.PropertyConfigurator;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.transaction.DummyTransactionManager;
import javax.naming.Context;
@@ -29,13 +28,13 @@
/**
* Local mode performance test for TreeCache.
*
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @author <a href="mailto:bwang at jboss.org">Ben Wang</a> May 20 2003
*/
public class ReplicatedAsyncMapPerfTest extends TestCase
{
TreeCache cache_;
- int cachingMode_ = TreeCache.LOCAL;
+ Configuration.CacheMode cachingMode_ = Configuration.CacheMode.LOCAL;
final static Properties p_;
// final static Log log_=LogFactory.getLog(LocalPerfAopTest.class);
String oldFactory_ = null;
@@ -73,7 +72,7 @@
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);
DummyTransactionManager.getInstance();
- initCaches(TreeCache.LOCAL);
+ initCaches(Configuration.CacheMode.LOCAL);
tm_ = new DummyTransactionManager();
originalStrBuf_ = new StringBuffer();
@@ -128,13 +127,13 @@
map_.clear();
}
- void initCaches(int caching_mode) throws Exception
+ void initCaches(Configuration.CacheMode caching_mode) throws Exception
{
cachingMode_ = caching_mode;
cache_ = new TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(cache_, "META-INF/replAsync-service.xml"); // read in generic replAsync xml
- cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache_.startService();
}
More information about the jboss-cvs-commits
mailing list