[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/passivation ...
Manik Surtani
msurtani at jboss.com
Thu Jan 4 00:35:36 EST 2007
User: msurtani
Date: 07/01/04 00:35:36
Modified: tests/functional/org/jboss/cache/passivation
PassivationTestsBase.java
Log:
Major changes around nodes, and the way they interact with the interceptor stack.
Also removed redundant methods in NodeSPI and removed the need for casting to NodeSPI in most cases.
Revision Changes Path
1.25 +148 -148 JBossCache/tests/functional/org/jboss/cache/passivation/PassivationTestsBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PassivationTestsBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/PassivationTestsBase.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- PassivationTestsBase.java 2 Jan 2007 13:30:29 -0000 1.24
+++ PassivationTestsBase.java 4 Jan 2007 05:35:36 -0000 1.25
@@ -38,7 +38,7 @@
* Base tests for passivation using any of the cache loaders
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: PassivationTestsBase.java,v 1.24 2007/01/02 13:30:29 msurtani Exp $
+ * @version $Id: PassivationTestsBase.java,v 1.25 2007/01/04 05:35:36 msurtani Exp $
*/
abstract public class PassivationTestsBase extends TestCase
{
@@ -110,7 +110,7 @@
protected void addDelay()
{
- ; // returns immediately in this case. Subclasses may override where a delay is needed.
+ ;// returns immediately in this case. Subclasses may override where a delay is needed.
}
public void testPrintPassivation() throws Exception
@@ -136,17 +136,17 @@
final String NODE = "/test";
final String KEY = "key";
Object retval = null;
- cache.remove(NODE); // nothing to remove
+ cache.remove(NODE);// nothing to remove
addDelay();
- retval = cache.put(NODE, KEY, 10); // put in memory
+ retval = cache.put(NODE, KEY, 10);// put in memory
assertNull(retval);
- retval = cache.put(NODE, KEY, 20); // put in memory
+ retval = cache.put(NODE, KEY, 20);// put in memory
addDelay();
- assertEquals(10, retval); // get from memory
- cache.evict(Fqn.fromString(NODE)); // passivate node
+ assertEquals(10, retval);// get from memory
+ cache.evict(Fqn.fromString(NODE));// passivate node
addDelay();
log.debug("______________");
- retval = cache.put(NODE, KEY, 30); // activate node then does put in memory
+ retval = cache.put(NODE, KEY, 30);// activate node then does put in memory
assertFalse(loader.exists(Fqn.fromString(NODE)));
assertEquals(20, retval);
}
@@ -156,16 +156,16 @@
final String NODE = "/a/b/c";
final String KEY = "key";
Object retval = null;
- cache.remove(NODE); // nothing to remove
+ cache.remove(NODE);// nothing to remove
addDelay();
- retval = cache.put(NODE, KEY, 10); // put in memory
+ retval = cache.put(NODE, KEY, 10);// put in memory
assertNull(retval);
addDelay();
- retval = cache.put(NODE, KEY, 20); // put in memory
+ retval = cache.put(NODE, KEY, 20);// put in memory
assertEquals(10, retval);
- cache.evict(Fqn.fromString(NODE)); // passivate node
- cache.evict(Fqn.fromString("/a/b")); // passivate parent node
- cache.evict(Fqn.fromString("/a")); // passivate parent node
+ cache.evict(Fqn.fromString(NODE));// passivate node
+ cache.evict(Fqn.fromString("/a/b"));// passivate parent node
+ cache.evict(Fqn.fromString("/a"));// passivate parent node
addDelay();
try
{
@@ -175,7 +175,7 @@
{
fail(e.toString());
}
- retval = cache.put(NODE, KEY, 30); // activate node, put in memory new value
+ retval = cache.put(NODE, KEY, 30);// activate node, put in memory new value
try
{
assertFalse(loader.exists(Fqn.fromString(NODE)));
@@ -194,10 +194,10 @@
pojo.getHobbies().add("Running");
pojo.getHobbies().add("Beerathlon");
pojo.getHobbies().add("Triathlon");
- cache.put("/mypojo", 322649, pojo); // put in memory
+ cache.put("/mypojo", 322649, pojo);// put in memory
addDelay();
- assertNotNull(cache.get("/mypojo", 322649)); // get from memory
- cache.evict(Fqn.fromString("/mypojo")); // passivate node
+ assertNotNull(cache.get("/mypojo", 322649));// get from memory
+ cache.evict(Fqn.fromString("/mypojo"));// passivate node
try
{
assertTrue(loader.exists(Fqn.fromString("/mypojo")));
@@ -206,7 +206,7 @@
{
fail(e.toString());
}
- SamplePojo pojo2 = (SamplePojo) cache.get("/mypojo", 322649); // activate node
+ SamplePojo pojo2 = (SamplePojo) cache.get("/mypojo", 322649);// activate node
try
{
assertFalse(loader.exists(Fqn.fromString("/mypojo")));
@@ -260,9 +260,9 @@
public void testPreloadingPassivation() throws Exception
{
- cache.remove("/"); // remove nothing
- cache.put("1/2/3/4/5/d", "key", "val"); // put in memory
- cache.evict(Fqn.fromString("1/2/3/4/5/d")); // passivate node
+ cache.remove("/");// remove nothing
+ cache.put("1/2/3/4/5/d", "key", "val");// put in memory
+ cache.evict(Fqn.fromString("1/2/3/4/5/d"));// passivate node
System.out.println("-- checking for 1/2/3/4/5/d");
addDelay();
try
@@ -273,11 +273,11 @@
{
fail(e.toString());
}
- cache.get("1/2/3/4/5/d"); // get from loader but doesn't load attributes
+ cache.get("1/2/3/4/5/d");// get from loader but doesn't load attributes
assertEquals(false, loader.exists(Fqn.fromString("1/2/3/4/5/d")));
assertTrue(cache.exists("1/2/3/4/5/d"));
System.out.println("-- 1/2/3/4/5/d exists");
- cache.get("1/2/3/4/5/d", "key"); // activate node
+ cache.get("1/2/3/4/5/d", "key");// activate node
assertEquals(false, loader.exists(Fqn.fromString("1/2/3/4/5/d")));
}
@@ -320,9 +320,9 @@
public void testGetChildren() throws Exception
{
- cache.put("/d/one", (Map) null);
- cache.put("/d/two", (Map) null);
- cache.put("/d/three", (Map) null);
+ cache.put("/d/one", null);
+ cache.put("/d/two", null);
+ cache.put("/d/three", null);
cache.get("/d");
Set children = cache.getChildrenNames("/d");
assertNotNull(children);
@@ -338,15 +338,15 @@
cache.put("/a/b/c/1", null);
cache.put("/a/b/c/2", null);
cache.put("/a/b/c/3", null);
- cache.evict(Fqn.fromString("/a/b/c/1")); // passivate node
- cache.evict(Fqn.fromString("/a/b/c/2")); // passivate node
- cache.evict(Fqn.fromString("/a/b/c/3")); // passivate node
- cache.evict(Fqn.fromString("/a/b/c")); // passivate node
- cache.evict(Fqn.fromString("/a/b")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
- cache.evict(Fqn.fromString("/")); // passivate node
+ cache.evict(Fqn.fromString("/a/b/c/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/b/c/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/b/c/3"));// passivate node
+ cache.evict(Fqn.fromString("/a/b/c"));// passivate node
+ cache.evict(Fqn.fromString("/a/b"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
+ cache.evict(Fqn.fromString("/"));// passivate node
addDelay();
- Set children = cache.getChildrenNames("/a/b/c"); // load node children names
+ Set children = cache.getChildrenNames("/a/b/c");// load node children names
assertNotNull(children);
assertEquals(3, children.size());
assertTrue(children.contains("1"));
@@ -355,10 +355,10 @@
assertTrue(loader.exists(Fqn.fromString("/a/b/c")));
- cache.get("/a/b/c/1", "test"); // load child
- cache.get("/a/b/c/2", "test"); // load child
- cache.get("/a/b/c/3", "test"); // load child
- cache.get("/a/b/c", "test"); // load attributes
+ cache.get("/a/b/c/1", "test");// load child
+ cache.get("/a/b/c/2", "test");// load child
+ cache.get("/a/b/c/3", "test");// load child
+ cache.get("/a/b/c", "test");// load attributes
assertFalse(loader.exists(Fqn.fromString("/a/b/c/1")));
assertFalse(loader.exists(Fqn.fromString("/a/b/c/2")));
@@ -372,7 +372,7 @@
{
cache.put("/1", null);
cache.put("a", null);
- Set children = cache.getChildrenNames("/"); // get root node children names
+ Set children = cache.getChildrenNames("/");// get root node children names
assertNotNull(children);
assertEquals(2, children.size());
assertTrue(children.contains("1"));
@@ -390,7 +390,7 @@
{
cache.put("/1", null);
cache.put("a", null);
- Set children = cache.getChildrenNames(""); // get children from root node
+ Set children = cache.getChildrenNames("");// get children from root node
assertNotNull(children);
assertEquals(2, children.size());
assertTrue(children.contains("1"));
@@ -410,7 +410,7 @@
{
cache.put("/a/b/c", null);
}
- Set children = cache.getChildrenNames((Fqn) null); // get "null* node children names
+ Set children = cache.getChildrenNames((Fqn) null);// get "null* node children names
assertTrue(children.isEmpty());
}
catch (Exception e)
@@ -445,30 +445,30 @@
public void testGetChildren6Passivation() throws Exception
{
- cache.put("/a/1", null); // put node in memory
- cache.put("/a/2", null); // put node in memory
- cache.put("/a/3", null); // put node in memory
+ cache.put("/a/1", null);// put node in memory
+ cache.put("/a/2", null);// put node in memory
+ cache.put("/a/3", null);// put node in memory
System.out.println("cache is " + cache.printLockInfo());
- cache.evict(Fqn.fromString("/a/1")); // passivate node
- cache.evict(Fqn.fromString("/a/2")); // passivate node
- cache.evict(Fqn.fromString("/a/3")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a")));
System.out.println("cache is " + cache.printLockInfo());
addDelay();
- assertNotNull(cache.get("/a")); // load node
- assertTrue(loader.exists(Fqn.fromString("/a"))); // children haven't been loaded
+ assertNotNull(cache.get("/a"));// load node
+ assertTrue(loader.exists(Fqn.fromString("/a")));// children haven't been loaded
Set children = cache.getChildrenNames("/a");
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
- cache.get("/a/1", "test"); // activate node
+ cache.get("/a/1", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/1")));
- cache.get("/a/2", "test"); // activate node
+ cache.get("/a/2", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/2")));
- cache.get("/a/3", "test"); // activate node
+ cache.get("/a/3", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/3")));
- cache.get("/a", "test"); // activate node
+ cache.get("/a", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a")));
}
@@ -479,25 +479,25 @@
cache.put("/a/3", null);
cache.put("/a", "test", "test");
System.out.println("cache is " + cache.printLockInfo());
- cache.evict(Fqn.fromString("/a/1")); // passivate node
- cache.evict(Fqn.fromString("/a/2")); // passivate node
- cache.evict(Fqn.fromString("/a/3")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a")));
System.out.println("cache is " + cache.printLockInfo());
addDelay();
- Object val = cache.get("/a", "test"); // load node's attributes but not children
+ Object val = cache.get("/a", "test");// load node's attributes but not children
assertEquals("attributes weren't loaded", "test", val);
- Set children = cache.getChildrenNames("/a"); // get node's children names
+ Set children = cache.getChildrenNames("/a");// get node's children names
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
- cache.get("/a/1", "test"); // activate node
+ cache.get("/a/1", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/1")));
- cache.get("/a/2", "test"); // activate node
+ cache.get("/a/2", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/2")));
- cache.get("/a/3", "test"); // activate node
+ cache.get("/a/3", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/3")));
assertTrue(loader.exists(Fqn.fromString("/a")));
}
@@ -508,23 +508,23 @@
cache.put("/a/2", null);
cache.put("/a/3", null);
System.out.println("cache is " + cache.printLockInfo());
- cache.evict(Fqn.fromString("/a/1")); // passivate node
- cache.evict(Fqn.fromString("/a/2")); // passivate node
- cache.evict(Fqn.fromString("/a/3")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
System.out.println("cache is " + cache.printLockInfo());
addDelay();
- assertNull(cache.get("/a", "test")); // load attributes only
- assertTrue(loader.exists(Fqn.fromString("/a"))); // loaded attibutes but not children
+ assertNull(cache.get("/a", "test"));// load attributes only
+ assertTrue(loader.exists(Fqn.fromString("/a")));// loaded attibutes but not children
- assertNull(cache.get("/a/1", "test")); // activate node
- assertFalse(loader.exists(Fqn.fromString("/a/1"))); // loaded attributes and has no children
- Set children = cache.getChildrenNames("/a"); // load children names
+ assertNull(cache.get("/a/1", "test"));// activate node
+ assertFalse(loader.exists(Fqn.fromString("/a/1")));// loaded attributes and has no children
+ Set children = cache.getChildrenNames("/a");// load children names
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
- assertTrue(loader.exists(Fqn.fromString("/a"))); //loaded children but didn't initalizae them
+ assertTrue(loader.exists(Fqn.fromString("/a")));//loaded children but didn't initalizae them
}
public void testGetChildren9Passivation() throws Exception
@@ -533,45 +533,45 @@
cache.put("/a/2", null);
cache.put("/a/3", null);
System.out.println("cache is " + cache.printLockInfo());
- cache.evict(Fqn.fromString("/a/1")); // passivate node
- cache.evict(Fqn.fromString("/a/2")); // passivate node
- cache.evict(Fqn.fromString("/a/3")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a")));
System.out.println("cache is " + cache.printLockInfo());
addDelay();
- cache.get("/a/1", "test"); // activate node
+ cache.get("/a/1", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/1")));
- cache.get("/a/2", "test"); // activate node
+ cache.get("/a/2", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/2")));
- cache.get("/a/3", "test"); // activate node
+ cache.get("/a/3", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/3")));
- Set children = cache.getChildrenNames("/a"); // get node's children names
+ Set children = cache.getChildrenNames("/a");// get node's children names
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
- assertNull(cache.get("/a", "test")); // load attributes and has no children by now, activation
+ assertNull(cache.get("/a", "test"));// load attributes and has no children by now, activation
assertFalse(loader.exists(Fqn.fromString("/a")));
- cache.evict(Fqn.fromString("/a/1")); // passivate node
- cache.evict(Fqn.fromString("/a/2")); // passivate node
- cache.evict(Fqn.fromString("/a/3")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
System.out.println("cache is " + cache.printLockInfo());
assertTrue(loader.exists(Fqn.fromString("/a")));
- cache.get("/a/1", "test"); // activate node
+ cache.get("/a/1", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/1")));
- cache.get("/a/2", "test"); // activate node
+ cache.get("/a/2", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/2")));
- cache.get("/a/3", "test"); // activate node
+ cache.get("/a/3", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/3")));
- children = cache.getChildrenNames("/a"); // get children names
+ children = cache.getChildrenNames("/a");// get children names
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
- assertNull(cache.get("/a", "test")); // load attributes and has no children by now, activation
+ assertNull(cache.get("/a", "test"));// load attributes and has no children by now, activation
assertFalse(loader.exists(Fqn.fromString("/a")));
}
@@ -582,27 +582,27 @@
cache.put("/a/2", null);
cache.put("/a/3", null);
System.out.println("cache is " + cache.printLockInfo());
- cache.evict(Fqn.fromString("/a/1")); // passivate node
- cache.evict(Fqn.fromString("/a/2")); // passivate node
- cache.evict(Fqn.fromString("/a/3")); // passivate node
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
System.out.println("cache is " + cache.printLockInfo());
addDelay();
assertTrue(loader.exists(Fqn.fromString("/a")));
- assertNull(cache.get("/a", "test")); // load attributes from loader
+ assertNull(cache.get("/a", "test"));// load attributes from loader
- cache.get("/a/1", "test"); // activate node
+ cache.get("/a/1", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/1")));
- cache.get("/a/2", "test"); // activate node
+ cache.get("/a/2", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/2")));
- cache.get("/a/3", "test"); // passivate node
+ cache.get("/a/3", "test");// passivate node
assertFalse(loader.exists(Fqn.fromString("/a/3")));
Set children = cache.getChildrenNames("/a");
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
- assertNull(cache.get("/a", "test")); // activate node
+ assertNull(cache.get("/a", "test"));// activate node
assertFalse(loader.exists(Fqn.fromString("/a")));
}
@@ -633,10 +633,10 @@
keys = cache.getKeys(key);
assertEquals(3, keys.size());
cache.removeData(key);
- cache.evict(key); // passivate node
+ cache.evict(key);// passivate node
addDelay();
- keys = cache.getKeys(key); // activate node
+ keys = cache.getKeys(key);// activate node
assertFalse(loader.exists(key));
assertEquals(0, keys.size());
}
@@ -650,10 +650,10 @@
cache.put(key, "keyC", "valC");
keys = cache.getKeys(key);
assertEquals(3, keys.size());
- cache.evict(key); // passivate node
+ cache.evict(key);// passivate node
assertTrue(loader.exists(key));
cache.removeData(key);
- keys = cache.getKeys(key); // activate node
+ keys = cache.getKeys(key);// activate node
assertFalse(loader.exists(key));
assertEquals(0, keys.size());
}
@@ -695,17 +695,17 @@
retval = cache.put(NODE, KEY, 10);
assertNull(retval);
- cache.evict(Fqn.fromString(NODE)); // passivate node
+ cache.evict(Fqn.fromString(NODE));// passivate node
addDelay();
assertTrue(loader.exists(Fqn.fromString(NODE)));
assertEquals(10, loader.get(Fqn.fromString(NODE)).get(KEY));
- retval = cache.remove(NODE, KEY); // activate node
+ retval = cache.remove(NODE, KEY);// activate node
assertEquals(10, retval);
assertFalse(loader.exists(Fqn.fromString(NODE)));
- cache.evict(Fqn.fromString(NODE)); // passiave node
+ cache.evict(Fqn.fromString(NODE));// passiave node
addDelay();
- retval = cache.remove(NODE, KEY); // activate node
+ retval = cache.remove(NODE, KEY);// activate node
assertFalse(loader.exists(Fqn.fromString(NODE)));
assertNull(retval);
}
@@ -743,14 +743,14 @@
{
cache.put("/first/second", "key1", "val1");
cache.put("/first/second/third", "key2", "val2");
- cache.evict(Fqn.fromString("/first/second")); // pasivate node to cache loader
+ cache.evict(Fqn.fromString("/first/second"));// pasivate node to cache loader
addDelay();
assertTrue(loader.exists(Fqn.fromString("/first/second")));
assertTrue(cache.exists("/first"));
String val = (String) cache.get("/first/second", "key1");
assertTrue(loader.exists(Fqn.fromString("/first/second")));
assertEquals("val1", val);
- String val2 = (String) cache.get("/first/second/third", "key2"); // activate node
+ String val2 = (String) cache.get("/first/second/third", "key2");// activate node
assertFalse(loader.exists(Fqn.fromString("/first/second/third")));
assertEquals("val2", val2);
assertTrue(cache.exists("/first/second/third"));
@@ -761,13 +761,13 @@
public void testEvictionWithCacheLoaderPassivation2() throws Exception
{
- cache.put("/first/second/third", "key1", "val1"); // stored in cache loader
- cache.evict(Fqn.fromString("/first/second/third")); // passivate node, note: it has no children
+ cache.put("/first/second/third", "key1", "val1");// stored in cache loader
+ cache.evict(Fqn.fromString("/first/second/third"));// passivate node, note: it has no children
addDelay();
assertTrue(loader.exists(Fqn.fromString("/first/second/third")));
assertTrue(cache.exists("/first/second"));
assertTrue(cache.exists("/first"));
- String val = (String) cache.get("/first/second/third", "key1"); // activate node
+ String val = (String) cache.get("/first/second/third", "key1");// activate node
assertFalse(loader.exists(Fqn.fromString("/first/second/third")));
assertEquals("val1", val);
assertTrue(cache.exists("/first/second/third"));
@@ -781,13 +781,13 @@
cache.put("/a/1", null);
cache.put("/a/2", null);
cache.put("/a/3", null);
- cache.evict(Fqn.fromString("/a/1")); // passivate node
+ cache.evict(Fqn.fromString("/a/1"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a/1")));
- cache.evict(Fqn.fromString("/a/2")); // passivate node
+ cache.evict(Fqn.fromString("/a/2"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a/2")));
- cache.evict(Fqn.fromString("/a/3")); // passivate node
+ cache.evict(Fqn.fromString("/a/3"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a/3")));
- cache.evict(Fqn.fromString("/a")); // passivate node
+ cache.evict(Fqn.fromString("/a"));// passivate node
assertTrue(loader.exists(Fqn.fromString("/a")));
addDelay();
DummyTransactionManager mgr = DummyTransactionManager.getInstance();
@@ -871,7 +871,7 @@
val2 = cache.get(NODE, "key");
assertNotNull(val2);
assertEquals(val, val2);
-// val=loader.get(NODE).get("key");
+ // val=loader.get(NODE).get("key");
assertNull("value should have been deleted from store on activation", loader.get(NODE));
}
@@ -1220,26 +1220,26 @@
checkChildren(Fqn.fromString("/key0/a"), new String[]{"1", "2"});
checkChildren(Fqn.fromString("/key0"),
new String[]{"a", "ab", "abc", "x", "xx", "xxx"});
-//
-// loader.put(Fqn.fromString("/key0/\u0000"), null);
-// loader.put(Fqn.fromString("/key0/\u0001"), null);
-// checkChildren(Fqn.fromString("/key0"),
-// new String[] { "a", "ab", "abc", "x", "xx", "xxx",
-// "\u0000", "\u0001"});
-//
-// loader.put(Fqn.fromString("/\u0001"), null);
-// checkChildren(new Fqn(), new String[] { "key0", "key1", "\u0001" });
-//
-// loader.put(Fqn.fromString("/\u0001/\u0001"), null);
-// checkChildren(Fqn.fromString("/\u0001"), new String[] { "\u0001" });
-//
-// loader.put(Fqn.fromString("/\u0001/\uFFFF"), null);
-// checkChildren(Fqn.fromString("/\u0001"),
-// new String[] { "\u0001", "\uFFFF" });
-//
-// loader.put(Fqn.fromString("/\u0001/\uFFFF/\u0001"), null);
-// checkChildren(Fqn.fromString("/\u0001/\uFFFF"),
-// new String[] { "\u0001" });
+ //
+ // loader.put(Fqn.fromString("/key0/\u0000"), null);
+ // loader.put(Fqn.fromString("/key0/\u0001"), null);
+ // checkChildren(Fqn.fromString("/key0"),
+ // new String[] { "a", "ab", "abc", "x", "xx", "xxx",
+ // "\u0000", "\u0001"});
+ //
+ // loader.put(Fqn.fromString("/\u0001"), null);
+ // checkChildren(new Fqn(), new String[] { "key0", "key1", "\u0001" });
+ //
+ // loader.put(Fqn.fromString("/\u0001/\u0001"), null);
+ // checkChildren(Fqn.fromString("/\u0001"), new String[] { "\u0001" });
+ //
+ // loader.put(Fqn.fromString("/\u0001/\uFFFF"), null);
+ // checkChildren(Fqn.fromString("/\u0001"),
+ // new String[] { "\u0001", "\uFFFF" });
+ //
+ // loader.put(Fqn.fromString("/\u0001/\uFFFF/\u0001"), null);
+ // checkChildren(Fqn.fromString("/\u0001/\uFFFF"),
+ // new String[] { "\u0001" });
}
/**
@@ -1355,10 +1355,10 @@
Object txnKey = new Object();
List mods = createUpdates();
loader.prepare(txnKey, mods, false);
-// try {
-// checkModifications(mods);
-// // fail("Expected lock timeout");
-// } catch (DeadlockException expected) {}
+ // try {
+ // checkModifications(mods);
+ // // fail("Expected lock timeout");
+ // } catch (DeadlockException expected) {}
loader.commit(txnKey);
addDelay();
checkModifications(mods);
@@ -1546,11 +1546,11 @@
/* Empty state. */
loader.remove(Fqn.fromString("/"));
// assertEquals(0, loader.loadEntireState().length);
-// loader.storeEntireState(new byte[0]);
-// assertEquals(0, loader.loadEntireState().length);
-// loader.storeEntireState(null);
-// assertEquals(0, loader.loadEntireState().length);
-// assertEquals(null, loader.get(FQN));
+ // loader.storeEntireState(new byte[0]);
+ // assertEquals(0, loader.loadEntireState().length);
+ // loader.storeEntireState(null);
+ // assertEquals(0, loader.loadEntireState().length);
+ // assertEquals(null, loader.get(FQN));
/* Use a complex object to ensure that the class catalog is used. */
Complex c1 = new Complex();
More information about the jboss-cvs-commits
mailing list