[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/statetransfer ...
Brian Stansberry
brian.stansberry at jboss.com
Wed Oct 25 00:50:19 EDT 2006
User: bstansberry
Date: 06/10/25 00:50:19
Modified: tests/functional/org/jboss/cache/statetransfer
StateTransfer200Test.java
StateTransferTestBase.java
Log:
Handle parsing of config XML in XmlConfigurationParser
Revision Changes Path
1.9 +6 -3 JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransfer200Test.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StateTransfer200Test.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransfer200Test.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- StateTransfer200Test.java 11 Sep 2006 17:42:41 -0000 1.8
+++ StateTransfer200Test.java 25 Oct 2006 04:50:19 -0000 1.9
@@ -12,6 +12,8 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.TreeCacheProxyImpl;
import org.jboss.cache.buddyreplication.BuddyManager;
+import org.jboss.cache.config.BuddyReplicationConfig;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.misc.TestingUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -23,7 +25,7 @@
* Tests that state transfer works properly if the version is 2.0.0.GA.
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class StateTransfer200Test extends VersionedTestBase
{
@@ -113,8 +115,9 @@
}
- private Element getBuddyConfig() throws Exception
+ private BuddyReplicationConfig getBuddyConfig() throws Exception
{
+ // TODO just build the object and skip the legacy XML step
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.newDocument();
@@ -126,6 +129,6 @@
Element pool = doc.createElement("buddyPoolName");
pool.appendChild(doc.createTextNode("TEST"));
config.appendChild(pool);
- return config;
+ return XmlConfigurationParser.parseBuddyReplicationConfig(config);
}
}
1.23 +2 -2 JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransferTestBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StateTransferTestBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransferTestBase.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- StateTransferTestBase.java 13 Oct 2006 14:53:29 -0000 1.22
+++ StateTransferTestBase.java 25 Oct 2006 04:50:19 -0000 1.23
@@ -167,7 +167,7 @@
+ prop.getProperty("cache.jdbc.password") + "\n" + "cache.jdbc.node.type="
+ prop.getProperty("cache.jdbc.node.type");
- c.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.JDBCCacheLoader",
+ c.setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.JDBCCacheLoader",
props, false, true, false));
}
else
@@ -183,7 +183,7 @@
tmp_location = escapeWindowsPath(tmp_location);
String props = "location = " + tmp_location + "\n";
- c.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", cacheloaderClass, props, async, true, false));
+ c.setCacheLoaderConfig(getSingleCacheLoaderConfig("", cacheloaderClass, props, async, true, false));
}
}
}
More information about the jboss-cvs-commits
mailing list