[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/notifications ...

Manik Surtani msurtani at jboss.com
Sat Dec 30 12:50:00 EST 2006


  User: msurtani
  Date: 06/12/30 12:50:00

  Modified:    tests/functional/org/jboss/cache/notifications  
                        CacheListenerTest.java RemoteCacheListenerTest.java
  Log:
  Major changes to restructure cache and node object model
  
  Revision  Changes    Path
  1.10      +4 -4      JBossCache/tests/functional/org/jboss/cache/notifications/CacheListenerTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheListenerTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/notifications/CacheListenerTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- CacheListenerTest.java	20 Nov 2006 07:33:14 -0000	1.9
  +++ CacheListenerTest.java	30 Dec 2006 17:49:59 -0000	1.10
  @@ -55,7 +55,7 @@
         if (optLocking) c.setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
         c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache = DefaultCacheFactory.createCache(c);
  -      tm = cache.getTransactionManager();
  +      tm = cache.getConfiguration().getRuntimeConfig().getTransactionManager();
         eventLog.events.clear();
         cache.addCacheListener(eventLog);
      }
  @@ -139,7 +139,7 @@
         assertEquals(expected, eventLog.events);
   
         // test that the node has in fact been removed.
  -      assertNull("Should be null", cache.getChild(fqn));
  +      assertNull("Should be null", cache.getRoot().getChild(fqn));
      }
   
   
  @@ -200,8 +200,8 @@
         cache.put(fqn, "key", "value");
         cache.put(newParent, "key", "value");
   
  -      Node n1 = cache.getChild(fqn);
  -      Node n2 = cache.getChild(newParent);
  +      Node n1 = cache.getRoot().getChild(fqn);
  +      Node n2 = cache.getRoot().getChild(newParent);
   
         eventLog.events.clear(); // clear events
         assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);
  
  
  
  1.3       +9 -9      JBossCache/tests/functional/org/jboss/cache/notifications/RemoteCacheListenerTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RemoteCacheListenerTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/notifications/RemoteCacheListenerTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- RemoteCacheListenerTest.java	31 Oct 2006 06:57:28 -0000	1.2
  +++ RemoteCacheListenerTest.java	30 Dec 2006 17:49:59 -0000	1.3
  @@ -23,21 +23,21 @@
   package org.jboss.cache.notifications;
   
   import junit.framework.TestCase;
  +import org.jboss.cache.AbstractCacheListener;
   import org.jboss.cache.Cache;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.Node;
  -import org.jboss.cache.AbstractCacheListener;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.factories.DefaultCacheFactory;
   import org.jboss.cache.lock.IsolationLevel;
  -import org.jboss.cache.config.Configuration;
   
  -import javax.transaction.TransactionManager;
   import javax.transaction.Transaction;
  +import javax.transaction.TransactionManager;
  +import java.util.ArrayList;
   import java.util.Collections;
  -import java.util.Map;
   import java.util.HashMap;
   import java.util.List;
  -import java.util.ArrayList;
  +import java.util.Map;
   
   /**
    * Remote conterpart of CacheListenerTest. Main difference is event is originating as local.
  @@ -71,7 +71,7 @@
         cache = DefaultCacheFactory.createCache(c);
   
         cache1 = DefaultCacheFactory.createCache(c);
  -      tm = cache1.getTransactionManager();
  +      tm = cache1.getConfiguration().getRuntimeConfig().getTransactionManager();
         eventLog.events.clear();
         cache1.addCacheListener(eventLog);
      }
  @@ -156,7 +156,7 @@
         assertEquals(expected, eventLog.events);
   
         // test that the node has in fact been removed.
  -      assertNull("Should be null", cache.getChild(fqn));
  +      assertNull("Should be null", cache.getRoot().getChild(fqn));
      }
   
   
  @@ -217,8 +217,8 @@
         cache.put(fqn, "key", "value");
         cache.put(newParent, "key", "value");
   
  -      Node n1 = cache.getChild(fqn);
  -      Node n2 = cache.getChild(newParent);
  +      Node n1 = cache.getRoot().getChild(fqn);
  +      Node n2 = cache.getRoot().getChild(newParent);
   
         eventLog.events.clear(); // clear events
         assertEquals("Event log should be empty", Collections.emptyList(), eventLog.events);
  
  
  



More information about the jboss-cvs-commits mailing list