Author: manik.surtani(a)jboss.com
Date: 2008-07-30 20:06:35 -0400 (Wed, 30 Jul 2008)
New Revision: 6455
Modified:
core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java
Log:
Fixed broken tests
Modified: core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java 2008-07-31 00:00:04
UTC (rev 6454)
+++ core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java 2008-07-31 00:06:35
UTC (rev 6455)
@@ -40,7 +40,6 @@
// now try retrieving a valid attribute and an invalid attribute
assertNotNull("Retrieval error: expected to retrieve " + CAPITAL + "
for " + AUSTRIA, cache.get(AUSTRIA, CAPITAL));
assertNull("Retrieval error: did not expect to retrieve " + AREA + "
for " + AUSTRIA, cache.get(AUSTRIA, AREA));
-// load++; // since we did a get on a non-existent key which triggered a load
// verify statistics after retrieving entries - misses should still be same since
nodes were already loaded
assertEquals("CacheLoaderLoads count error: ", load,
loader.getCacheLoaderLoads());
@@ -98,9 +97,7 @@
assertEquals("CacheLoaderStores count error: ", stores,
store.getCacheLoaderStores());
// add two attributes - this should cause two stores
- // plus one load as we're doing put(k, v)
stores += 2;
-// load++;
cache.put(POLAND, CAPITAL, "Warsaw");
cache.put(POLAND, CURRENCY, "Zloty");
assertEquals("CacheLoaderLoads count error: ", load,
loader.getCacheLoaderLoads());
Modified: core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java 2008-07-31 00:00:04
UTC (rev 6454)
+++ core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java 2008-07-31 00:06:35
UTC (rev 6455)
@@ -48,8 +48,6 @@
// now try retrieving a valid attribute and an invalid attribute
assertNotNull("Retrieval error: expected to retrieve " + CAPITAL + "
for " + AUSTRIA, cache.get(AUSTRIA, CAPITAL));
- // will cause a load
-// miss++;
assertNull("Retrieval error: did not expect to retrieve " + AREA + "
for " + AUSTRIA, cache.get(AUSTRIA, AREA));
// verify statistics after retrieving entries - no change since nodes were already
loaded
@@ -108,8 +106,6 @@
assertEquals("Activations count error: ", activations,
act.getActivations());
assertEquals("Passivations count error: ", 1, pass.getPassivations());
- // add a new node and two attributes - this should cause a miss only
-// miss++;
cache.put(POLAND, new HashMap<String, Object>());
cache.put(POLAND, CAPITAL, "Warsaw");
cache.put(POLAND, CURRENCY, "Zloty");
Show replies by date