Author: manik.surtani(a)jboss.com
Date: 2008-10-30 22:56:09 -0400 (Thu, 30 Oct 2008)
New Revision: 7039
Modified:
core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java
core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java
Log:
Added more debug
Modified: core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RegionImpl.java 2008-10-31 01:16:04 UTC (rev
7038)
+++ core/trunk/src/main/java/org/jboss/cache/RegionImpl.java 2008-10-31 02:56:09 UTC (rev
7039)
@@ -124,6 +124,7 @@
public void processEvictionQueues()
{
+ if (trace) log.trace("Processing eviction queue for region
["+getFqn()+"]. Queue size is " + evictionEventQueue.size());
evictionAlgorithm.process(evictionEventQueue);
}
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java 2008-10-31
01:16:04 UTC (rev 7038)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java 2008-10-31
02:56:09 UTC (rev 7039)
@@ -134,6 +134,8 @@
{
synchronized (processedRegions)
{
+ if (log.isTraceEnabled()) log.trace("Processing eviction regions " +
processedRegions);
+
for (Region region : processedRegions)
{
handleRegion(region);
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-31
01:16:04 UTC (rev 7038)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java 2008-10-31
02:56:09 UTC (rev 7039)
@@ -6,11 +6,9 @@
*/
package org.jboss.cache.eviction;
-import org.jboss.cache.config.ConfigurationException;
import org.jboss.cache.config.parsing.XmlConfigHelper;
import org.jboss.cache.config.parsing.element.EvictionElementParser;
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;
@@ -71,22 +69,16 @@
String xml = "<region name=\"/Test/\">\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
- boolean caught = false;
- try
- {
EvictionElementParser.parseEvictionPolicyConfig(element, config);
config.validate();
- }
- catch (ConfigurationException ce)
- {
- caught = true;
- }
- assertTrue("Configure exception should have been caught, maxNodes is
required", caught);
+ assert config.getMaxNodes() == -1;
+
xml = "<region name=\"/Test/\">\n" +
"<property name=\"maxNodes\"
value=\"10000\"></property>\n" +
"</region>";
+
element = XmlConfigHelper.stringToElementInCoreNS(xml);
EvictionElementParser.parseEvictionPolicyConfig(element, config);
Show replies by date