[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/eviction ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 00:49:52 EDT 2006
User: msurtani
Date: 06/07/20 00:49:52
Modified: tests/functional/org/jboss/cache/eviction
EvictionConfigurationTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.7 +8 -6 JBossCache/tests/functional/org/jboss/cache/eviction/EvictionConfigurationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionConfigurationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/EvictionConfigurationTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- EvictionConfigurationTest.java 7 May 2006 03:34:39 -0000 1.6
+++ EvictionConfigurationTest.java 20 Jul 2006 04:49:52 -0000 1.7
@@ -7,15 +7,16 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
/**
* Unit test to test Eviction configuration types.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class EvictionConfigurationTest extends TestCase
{
@@ -204,10 +205,11 @@
private void setupCache(String configurationName) throws Exception
{
cache = new TreeCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache, configurationName);
- cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
- cache.setIsolationLevel(IsolationLevel.SERIALIZABLE);
+ XmlConfigurationParser parser = new XmlConfigurationParser();
+ Configuration c = parser.parseFile(configurationName);
+ c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ c.setIsolationLevel(IsolationLevel.SERIALIZABLE);
+ cache.setConfiguration(c);
cache.startService();
regionManager = cache.getEvictionRegionManager();
}
More information about the jboss-cvs-commits
mailing list