Author: bstansberry(a)jboss.com
Date: 2008-10-12 17:29:19 -0400 (Sun, 12 Oct 2008)
New Revision: 6904
Modified:
core/branches/2.2.X/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
Log:
[JBCACHE-1423] Add test
Modified:
core/branches/2.2.X/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
===================================================================
---
core/branches/2.2.X/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java 2008-10-10
15:25:26 UTC (rev 6903)
+++
core/branches/2.2.X/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java 2008-10-12
21:29:19 UTC (rev 6904)
@@ -765,6 +765,31 @@
assertEquals(5, cache.getNumberOfLocksHeld());
mgr.commit();
}
+
+ /** Test for JBCACHE-1423 */
+ public void testPutDataMapAfterPassivation() throws Exception
+ {
+ Fqn f = Fqn.fromString("/a");
+ assert !cache.exists(f);
+ assert !loader.exists(f);
+
+ Map<Object, Object> input = new HashMap();
+ input.put("one", "one");
+ input.put("two", "two");
+ cache.put(f, input);
+
+ cache.evict(f);
+
+ input = new HashMap();
+ input.put("one", "oneA");
+ cache.put(f, input);
+
+ Map data = cache.getRoot().getChild(f).getData();
+ assertEquals("incorrect # of entries", 2, data.size());
+ assertEquals("Has key 'one", "oneA",
data.get("one"));
+ assertEquals("Has key 'two", "two",
data.get("two"));
+
+ }
public void testTxPutCommit() throws Exception
Show replies by date