Author: manik.surtani(a)jboss.com
Date: 2008-10-22 23:27:15 -0400 (Wed, 22 Oct 2008)
New Revision: 7004
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java
Log:
Fixed broken tests
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java 2008-10-23
03:18:45 UTC (rev 7003)
+++
core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java 2008-10-23
03:27:15 UTC (rev 7004)
@@ -24,8 +24,8 @@
{
ElementSizeAlgorithmConfig config = new ElementSizeAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute
name=\"maxNodes\">1000</attribute>" +
- "<attribute
name=\"maxElementsPerNode\">100</attribute>" +
+ "<property name=\"maxNodes\"
value=\"1000\"></property>" +
+ "<property name=\"maxElementsPerNode\"
value=\"100\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -41,7 +41,7 @@
{
ElementSizeAlgorithmConfig config = new ElementSizeAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute
name=\"maxNodes\">1000</attribute>" +
+ "<property name=\"maxNodes\"
value=\"1000\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -64,7 +64,7 @@
{
ElementSizeAlgorithmConfig config = new ElementSizeAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute
name=\"maxElementsPerNode\">100</attribute>" +
+ "<property name=\"maxElementsPerNode\"
value=\"100\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java 2008-10-23
03:18:45 UTC (rev 7003)
+++
core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java 2008-10-23
03:27:15 UTC (rev 7004)
@@ -26,7 +26,7 @@
{
FIFOAlgorithmConfig config = new FIFOAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute
name=\"maxNodes\">1000</attribute>" +
+ "<property name=\"maxNodes\"
value=\"1000\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -63,7 +63,7 @@
{
FIFOAlgorithmConfig config = new FIFOAlgorithmConfig();
String xml = "<region>" +
- "<attribute
name=\"maxNodes\">1000</attribute>" +
+ "<property name=\"maxNodes\"
value=\"1000\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java 2008-10-23
03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java 2008-10-23
03:27:15 UTC (rev 7004)
@@ -27,8 +27,8 @@
LFUAlgorithmConfig config = new LFUAlgorithmConfig();
String xml =
"<region name=\"abc\">" +
- "<attribute
name=\"minNodes\">10</attribute>" +
- "<attribute
name=\"maxNodes\">20</attribute>" +
+ "<property name=\"minNodes\"
value=\"10\"></property>" +
+ "<property name=\"maxNodes\"
value=\"20\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -45,7 +45,7 @@
LFUAlgorithmConfig config = new LFUAlgorithmConfig();
String xml =
"<region name=\"abc\">" +
- "<attribute
name=\"minNodes\">10</attribute>" +
+ "<property name=\"minNodes\"
value=\"10\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -61,7 +61,7 @@
LFUAlgorithmConfig config = new LFUAlgorithmConfig();
String xml =
"<region name=\"abc\">" +
- "<attribute
name=\"maxNodes\">20</attribute>" +
+ "<property name=\"maxNodes\"
value=\"20\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java 2008-10-23
03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java 2008-10-23
03:27:15 UTC (rev 7004)
@@ -30,8 +30,8 @@
LRUAlgorithmConfig config = new LRUAlgorithmConfig();
String xml =
"<region name=\"/org/jboss/data\">\n" +
- "<attribute
name=\"maxNodes\">5000</attribute>\n" +
- "<attribute
name=\"timeToLive\">1000</attribute>\n" +
+ "<property name=\"maxNodes\"
value=\"5000\"></property>\n" +
+ "<property name=\"timeToLive\"
value=\"1000\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -47,9 +47,9 @@
{
LRUAlgorithmConfig config = new LRUAlgorithmConfig();
String xml = "<region name=\"/maxAgeTest/\">\n" +
- "<attribute
name=\"maxNodes\">10000</attribute>\n" +
- "<attribute
name=\"timeToLive\">1000</attribute>\n" +
- "<attribute name=\"maxAge\">10</attribute>\n"
+
+ "<property name=\"maxNodes\"
value=\"10000\"></property>\n" +
+ "<property name=\"timeToLive\"
value=\"1000\"></property>\n" +
+ "<property name=\"maxAge\"
value=\"10\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -64,8 +64,8 @@
public void testXMLParsing3() throws Exception
{
String xml = "<eviction wakeupInterval=\"30\"><region
name=\"/maxAgeTest/\">\n" +
- "<attribute
name=\"maxNodes\">10000</attribute>\n" +
- "<attribute name=\"maxAge\">10</attribute>\n"
+
+ "<property name=\"maxNodes\"
value=\"10000\"></property>\n" +
+ "<property name=\"maxAge\"
value=\"10\"></property>\n" +
"</region></eviction>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
boolean caught = false;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java 2008-10-23
03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java 2008-10-23
03:27:15 UTC (rev 7004)
@@ -9,9 +9,9 @@
import org.jboss.cache.config.ConfigurationException;
import org.jboss.cache.config.parsing.XmlConfigHelper;
import org.jboss.cache.config.parsing.element.EvictionElementParser;
-import org.testng.annotations.AfterMethod;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.w3c.dom.Element;
@@ -43,7 +43,7 @@
{
String xml =
"<region name=\"/org/jboss/data\">\n" +
- "<attribute
name=\"maxNodes\">5000</attribute>\n" +
+ "<property name=\"maxNodes\"
value=\"5000\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -56,7 +56,7 @@
public void testXMLParsing2() throws Exception
{
String xml = "<region name=\"/Test/\">\n" +
- "<attribute
name=\"maxNodes\">10000</attribute>\n" +
+ "<property name=\"maxNodes\"
value=\"10000\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -84,7 +84,7 @@
assertTrue("Configure exception should have been caught, maxNodes is
required", caught);
xml = "<region name=\"/Test/\">\n" +
- "<attribute
name=\"maxNodes\">10000</attribute>\n" +
+ "<property name=\"maxNodes\"
value=\"10000\"></property>\n" +
"</region>";
element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java 2008-10-23
03:18:45 UTC (rev 7003)
+++
core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java 2008-10-23
03:27:15 UTC (rev 7004)
@@ -2,6 +2,7 @@
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
+import org.jboss.cache.UnitTestCacheFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionPolicyConfig;
@@ -24,7 +25,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.cache.UnitTestCacheFactory;
@Test(groups = "functional", sequential = false)
public class BackwardCompatibilityTest
@@ -185,7 +185,7 @@
{
String xml = "<jbosscache><eviction
wakeUpInterval=\"6\">" +
"<default algorithmClass=\"" +
FIFOAlgorithm.class.getName() + "\">" +
- "<attribute name=\"maxNodes\">2</attribute>"
+
+ "<property name=\"maxNodes\"
value=\"2\"></property>" +
"</default>" +
"</eviction></jbosscache>";
doTest(xml, false);
Show replies by date