[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/mgmt ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 04:05:18 EDT 2006
User: msurtani
Date: 06/07/20 04:05:18
Modified: tests/functional/org/jboss/cache/mgmt InvalidationTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.4 +12 -11 JBossCache/tests/functional/org/jboss/cache/mgmt/InvalidationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InvalidationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/mgmt/InvalidationTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- InvalidationTest.java 26 Feb 2006 16:34:17 -0000 1.3
+++ InvalidationTest.java 20 Jul 2006 08:05:18 -0000 1.4
@@ -1,21 +1,21 @@
package org.jboss.cache.mgmt;
-import java.util.HashMap;
-import java.util.List;
-
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-
import org.jboss.cache.Fqn;
-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.interceptors.InvalidationInterceptor;
+import java.util.HashMap;
+import java.util.List;
+
/**
* Simple functional tests for InvalidationInterceptor statistics
* @author Jerry Gauthier
- * @version $Id: InvalidationTest.java,v 1.3 2006/02/26 16:34:17 jerrygauth Exp $
+ * @version $Id: InvalidationTest.java,v 1.4 2006/07/20 08:05:18 msurtani Exp $
*/
public class InvalidationTest extends TestCase
{
@@ -138,11 +138,12 @@
private TreeCache createCache(String clusterName) throws Exception
{
TreeCache cache = new TreeCache();
- PropertyConfigurator config=new PropertyConfigurator();
- config.configure(cache, "META-INF/invalidationSync-service.xml");
- cache.setCacheMode(TreeCache.INVALIDATION_SYNC);
- cache.setUseInterceptorMbeans(true);
- cache.setClusterName(clusterName);
+ XmlConfigurationParser parser = new XmlConfigurationParser();
+ Configuration c = parser.parseFile("META-INF/invalidationSync-service.xml");
+ cache.setConfiguration(c);
+ c.setCacheModeInt(Configuration.CacheMode.INVALIDATION_SYNC);
+ c.setUseInterceptorMbeans(true);
+ c.setClusterName(clusterName);
cache.createService();
cache.startService();
return cache;
More information about the jboss-cvs-commits
mailing list