Author: manik.surtani(a)jboss.com
Date: 2007-10-23 07:14:44 -0400 (Tue, 23 Oct 2007)
New Revision: 4670
Modified:
core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java
Log:
Fixed broken test
Modified: core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java 2007-10-23
11:06:11 UTC (rev 4669)
+++ core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java 2007-10-23
11:14:44 UTC (rev 4670)
@@ -1,12 +1,5 @@
package org.jboss.cache.mgmt;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNotNull;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.assertTrue;
-
-import java.util.HashMap;
-
import org.jboss.cache.CacheImpl;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
@@ -15,9 +8,12 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.interceptors.InvalidationInterceptor;
import org.jboss.cache.misc.TestingUtil;
+import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+
+import java.util.HashMap;
/**
* Simple functional tests for InvalidationInterceptor statistics
*
@@ -104,7 +100,7 @@
// verify basic statistics for entries loaded into cache
assertEquals("Cache1 Invalidations count error: ", new Long(6), new
Long(mgmt1.getInvalidations()));
- assertEquals("Cache2 Invalidations count error: ", new Long(10), new
Long(mgmt2.getInvalidations()));
+ assertEquals("Cache2 Invalidations count error: ", new Long(9), new
Long(mgmt2.getInvalidations()));
// reset statistics
mgmt1.resetStatistics();
@@ -135,7 +131,8 @@
private void loadCache2(CacheImpl<Object, Object> cache) throws Exception
{
- cache.put("Europe", new HashMap<Object, Object>());
+ // the following line will invalidate /Europe (and its' children) across the
cluster!!
+// cache.put("Europe", new HashMap<Object, Object>());
cache.put("Europe/Austria", new HashMap<Object, Object>());
cache.put("Europe/Austria", CAPITAL, "Vienna");
cache.put("Europe/Austria", CURRENCY, "Euro");
Show replies by date