[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/passivation ...
Brian Stansberry
brian.stansberry at jboss.com
Wed Oct 25 00:50:20 EDT 2006
User: bstansberry
Date: 06/10/25 00:50:20
Modified: tests/functional/org/jboss/cache/passivation
PassivationToLocalDelegatingCacheLoaderTest.java
PassivationToFileCacheLoaderTest.java
PassivationToJDBCCacheLoaderTest.java
PassivationTestsBase.java
PassivationToBdbjeCacheLoaderTest.java
Log:
Handle parsing of config XML in XmlConfigurationParser
Revision Changes Path
1.6 +2 -2 JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToLocalDelegatingCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivationToLocalDelegatingCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToLocalDelegatingCacheLoaderTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- PassivationToLocalDelegatingCacheLoaderTest.java 6 Sep 2006 15:31:00 -0000 1.5
+++ PassivationToLocalDelegatingCacheLoaderTest.java 25 Oct 2006 04:50:20 -0000 1.6
@@ -11,7 +11,7 @@
* Runs a test against using delegated cache loader
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: PassivationToLocalDelegatingCacheLoaderTest.java,v 1.5 2006/09/06 15:31:00 msurtani Exp $
+ * @version $Id: PassivationToLocalDelegatingCacheLoaderTest.java,v 1.6 2006/10/25 04:50:20 bstansberry Exp $
*/
public class PassivationToLocalDelegatingCacheLoaderTest extends PassivationTestsBase
{
@@ -27,7 +27,7 @@
delegating_cache.start();
cache_loader = new LocalDelegatingCacheLoader(delegating_cache);
// configure first ...
- cache.getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig("", "org.jboss.cache.loader.LocalDelegatingCacheLoader", "", false, false));
+ cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig("", "org.jboss.cache.loader.LocalDelegatingCacheLoader", "", false, false));
cache.setCacheLoader(cache_loader);
}
1.7 +8 -4 JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToFileCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivationToFileCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToFileCacheLoaderTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- PassivationToFileCacheLoaderTest.java 20 Jul 2006 09:03:54 -0000 1.6
+++ PassivationToFileCacheLoaderTest.java 25 Oct 2006 04:50:20 -0000 1.7
@@ -2,6 +2,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
import org.w3c.dom.Element;
@@ -9,7 +12,7 @@
* tests passivation using file cache loader
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: PassivationToFileCacheLoaderTest.java,v 1.6 2006/07/20 09:03:54 msurtani Exp $
+ * @version $Id: PassivationToFileCacheLoaderTest.java,v 1.7 2006/10/25 04:50:20 bstansberry Exp $
*/
public class PassivationToFileCacheLoaderTest extends PassivationTestsBase {
@@ -24,10 +27,10 @@
tmp_location=System.getProperty("jva.io.tmpdir", "/tmp");
}
- cache.getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig(tmp_location));
+ cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(tmp_location));
}
- protected Element getCacheLoaderConfig(String loc) throws Exception
+ protected CacheLoaderConfig getCacheLoaderConfig(String loc) throws Exception
{
String xml = " <config>\n" +
" \n" +
@@ -44,7 +47,8 @@
" </cacheloader>\n" +
" \n" +
" </config>";
- return XmlHelper.stringToElement(xml);
+ Element element = XmlHelper.stringToElement(xml);
+ return XmlConfigurationParser.parseCacheLoaderConfig(element);
}
1.2 +8 -4 JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToJDBCCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivationToJDBCCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToJDBCCacheLoaderTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- PassivationToJDBCCacheLoaderTest.java 30 Aug 2006 15:14:33 -0000 1.1
+++ PassivationToJDBCCacheLoaderTest.java 25 Oct 2006 04:50:20 -0000 1.2
@@ -8,6 +8,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
import org.w3c.dom.Element;
@@ -18,13 +21,13 @@
* This test has MySQL hard-coded. To run it, run MySQL first: mysqld -u=root
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: PassivationToJDBCCacheLoaderTest.java,v 1.1 2006/08/30 15:14:33 msurtani Exp $
+ * @version $Id: PassivationToJDBCCacheLoaderTest.java,v 1.2 2006/10/25 04:50:20 bstansberry Exp $
*/
public class PassivationToJDBCCacheLoaderTest extends PassivationTestsBase
{
- protected Element getCacheLoaderConfig() throws Exception
+ protected CacheLoaderConfig getCacheLoaderConfig() throws Exception
{
String xml = " <config>\n" +
" \n" +
@@ -42,7 +45,8 @@
" </cacheloader>\n" +
" \n" +
" </config>";
- return XmlHelper.stringToElement(xml);
+ Element element = XmlHelper.stringToElement(xml);
+ return XmlConfigurationParser.parseCacheLoaderConfig(element);
}
@@ -66,7 +70,7 @@
protected void configureCache() throws Exception
{
- cache.getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig());
+ cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig());
}
public static Test suite()
1.19 +9 -4 JBossCache/tests/functional/org/jboss/cache/passivation/PassivationTestsBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivationTestsBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/PassivationTestsBase.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- PassivationTestsBase.java 24 Oct 2006 11:35:31 -0000 1.18
+++ PassivationTestsBase.java 25 Oct 2006 04:50:20 -0000 1.19
@@ -10,6 +10,8 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Modification;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.SamplePojo;
import org.jboss.cache.lock.IsolationLevel;
@@ -36,7 +38,7 @@
* Base tests for passivation using any of the cache loaders
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: PassivationTestsBase.java,v 1.18 2006/10/24 11:35:31 msurtani Exp $
+ * @version $Id: PassivationTestsBase.java,v 1.19 2006/10/25 04:50:20 bstansberry Exp $
*/
abstract public class PassivationTestsBase extends TestCase
{
@@ -50,7 +52,7 @@
static final Fqn FQN = new Fqn("key");
- protected Element getCacheLoaderConfig(String preload, String cacheloaderClass, String properties, boolean async, boolean fetchPersistentState) throws Exception
+ protected CacheLoaderConfig getCacheLoaderConfig(String preload, String cacheloaderClass, String properties, boolean async, boolean fetchPersistentState) throws Exception
{
String xml = "<config>\n" +
"<passivation>true</passivation>\n" +
@@ -62,7 +64,8 @@
"<fetchPersistentState>" + fetchPersistentState + "</fetchPersistentState>\n" +
"</cacheloader>\n" +
"</config>";
- return XmlHelper.stringToElement(xml);
+ Element element = XmlHelper.stringToElement(xml);
+ return XmlConfigurationParser.parseCacheLoaderConfig(element);
}
protected void setUp() throws Exception
@@ -1676,6 +1679,8 @@
*/
private static class Complex implements Serializable
{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 8950692199236424832L;
Complex nested;
1.12 +8 -4 JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToBdbjeCacheLoaderTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivationToBdbjeCacheLoaderTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/PassivationToBdbjeCacheLoaderTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- PassivationToBdbjeCacheLoaderTest.java 20 Jul 2006 09:03:54 -0000 1.11
+++ PassivationToBdbjeCacheLoaderTest.java 25 Oct 2006 04:50:20 -0000 1.12
@@ -2,6 +2,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
import org.w3c.dom.Element;
@@ -13,7 +16,7 @@
* Berkeley DB instead of a file-based CacheLoader
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: PassivationToBdbjeCacheLoaderTest.java,v 1.11 2006/07/20 09:03:54 msurtani Exp $
+ * @version $Id: PassivationToBdbjeCacheLoaderTest.java,v 1.12 2006/10/25 04:50:20 bstansberry Exp $
*/
public class PassivationToBdbjeCacheLoaderTest extends PassivationTestsBase {
@@ -45,11 +48,11 @@
}
}
- cache.getConfiguration().setCacheLoaderConfiguration(getCacheLoaderConfig(tmp_location));
+ cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(tmp_location));
}
- protected Element getCacheLoaderConfig(String loc) throws Exception
+ protected CacheLoaderConfig getCacheLoaderConfig(String loc) throws Exception
{
String xml = " <config>\n" +
" \n" +
@@ -66,7 +69,8 @@
" </cacheloader>\n" +
" \n" +
" </config>";
- return XmlHelper.stringToElement(xml);
+ Element element = XmlHelper.stringToElement(xml);
+ return XmlConfigurationParser.parseCacheLoaderConfig(element);
}
public static Test suite() {
More information about the jboss-cvs-commits
mailing list