[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/marshall ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 02:04:56 EDT 2006
User: msurtani
Date: 06/07/20 02:04:56
Modified: tests/functional/org/jboss/cache/marshall SyncReplTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.6 +10 -6 JBossCache/tests/functional/org/jboss/cache/marshall/SyncReplTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SyncReplTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/marshall/SyncReplTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- SyncReplTest.java 5 May 2006 12:06:58 -0000 1.5
+++ SyncReplTest.java 20 Jul 2006 06:04:56 -0000 1.6
@@ -12,8 +12,9 @@
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.factories.XmlConfigurationParser;
import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -27,7 +28,7 @@
* Test case for marshalling using Sync mode.
* @author Ben Wang
*
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class SyncReplTest extends TestCase {
TreeCache cache1, cache2;
@@ -61,11 +62,14 @@
private TreeCache createCache(String name) throws Exception {
TreeCache tree=new TreeCache();
- PropertyConfigurator config=new PropertyConfigurator();
- config.configure(tree, "META-INF/replSync-service.xml"); // read in generic replAsync xml
- tree.setClusterName(name);
+
+ XmlConfigurationParser parser = new XmlConfigurationParser();
+ Configuration c = parser.parseFile("META-INF/replSync-service.xml");
+ tree.setConfiguration(c);
+
+ c.setClusterName(name);
// Use marshaller
- tree.setUseMarshalling(true);
+ c.setUseRegionBasedMarshalling(true);
tree.createService();
tree.startService();
return tree;
More information about the jboss-cvs-commits
mailing list