[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader ...
Manik Surtani
manik at jboss.org
Fri Jul 13 07:26:00 EDT 2007
User: msurtani
Date: 07/07/13 07:26:00
Modified: tests/functional/org/jboss/cache/loader
CacheLoaderTestsBase.java
Log:
Added test to check recursive removal of child nodes when removing the root node directly on the cache loader.
Revision Changes Path
1.55 +13 -1 JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderTestsBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderTestsBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderTestsBase.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- CacheLoaderTestsBase.java 13 Jul 2007 10:54:08 -0000 1.54
+++ CacheLoaderTestsBase.java 13 Jul 2007 11:26:00 -0000 1.55
@@ -33,7 +33,7 @@
* Commons tests for all CacheLoaders
*
* @author Bela Ban
- * @version $Id: CacheLoaderTestsBase.java,v 1.54 2007/07/13 10:54:08 msurtani Exp $
+ * @version $Id: CacheLoaderTestsBase.java,v 1.55 2007/07/13 11:26:00 msurtani Exp $
*/
abstract public class CacheLoaderTestsBase extends AbstractCacheLoaderTestBase
{
@@ -936,6 +936,18 @@
assertEquals(0, cache.getKeys("/").size());
}
+ public void testLoaderRemoveRoot() throws Exception
+ {
+ Fqn f = Fqn.fromString("/a");
+ loader.put(f, "k", "v");
+ assertTrue(loader.get(f).containsKey("k"));
+ loader.remove(f);
+ assertNull(loader.get(f));
+ loader.put(f, "k", "v");
+ assertTrue(loader.get(f).containsKey("k"));
+ loader.remove(Fqn.ROOT);
+ assertNull("Removing Fqn.ROOT should cause all children to be removed as well", loader.get(f));
+ }
public void testEvictionWithCacheLoader()
{
More information about the jboss-cvs-commits
mailing list