Author: bstansberry(a)jboss.com
Date: 2008-10-15 16:23:22 -0400 (Wed, 15 Oct 2008)
New Revision: 6963
Modified:
core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
Log:
[JBCACHE-1423] Port 2.2.X test to trunk
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java 2008-10-15
20:12:16 UTC (rev 6962)
+++
core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java 2008-10-15
20:23:22 UTC (rev 6963)
@@ -805,8 +805,36 @@
assertTrue(children.contains("3"));
mgr.commit();
}
+
+
+ public void testPutDataMapAfterPassivation() throws Exception
+ {
+ CacheSPI<Object, Object> cache = cacheTL.get();
+ CacheLoader loader = loaderTL.get();
+ 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
{
CacheSPI<Object, Object> cache = cacheTL.get();
Show replies by date