[jboss-cvs] JBossCache/tests/perf/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 06:54:01 EDT 2006
User: msurtani
Date: 06/07/20 06:54:01
Modified: tests/perf/org/jboss/cache LocalMapPerfTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.3 +6 -5 JBossCache/tests/perf/org/jboss/cache/LocalMapPerfTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocalMapPerfTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/LocalMapPerfTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- LocalMapPerfTest.java 31 May 2006 14:08:39 -0000 1.2
+++ LocalMapPerfTest.java 20 Jul 2006 10:54:01 -0000 1.3
@@ -15,6 +15,7 @@
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.lock.LockStrategyFactory;
import org.jboss.cache.transaction.DummyTransactionManager;
+import org.jboss.cache.config.Configuration;
import javax.naming.Context;
import javax.naming.InitialContext;
@@ -29,13 +30,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 LocalMapPerfTest 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;
@@ -68,7 +69,7 @@
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);
DummyTransactionManager.getInstance();
- initCaches(TreeCache.LOCAL);
+ initCaches(Configuration.CacheMode.LOCAL);
tm_ = new DummyTransactionManager();
log("LocalPerfAopTest: cacheMode=LOCAL, one cache");
@@ -112,13 +113,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/local-service.xml"); // read in generic local 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