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

Manik Surtani msurtani at jboss.com
Tue Sep 5 07:03:26 EDT 2006


  User: msurtani
  Date: 06/09/05 07:03:26

  Modified:    tests/functional/org/jboss/cache/api  SyncReplTest.java
  Log:
  Fixed suppress locking bugs, improved interceptor chain construction, added new interceptor to construct invocation ctx
  
  Revision  Changes    Path
  1.4       +17 -17    JBossCache/tests/functional/org/jboss/cache/api/SyncReplTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SyncReplTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/SyncReplTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- SyncReplTest.java	4 Sep 2006 01:22:17 -0000	1.3
  +++ SyncReplTest.java	5 Sep 2006 11:03:26 -0000	1.4
  @@ -9,31 +9,31 @@
   
   import junit.framework.TestCase;
   import org.jboss.cache.Cache;
  +import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
  +import org.jboss.cache.InvocationContext;
   import org.jboss.cache.Node;
   import org.jboss.cache.TreeCacheProxyImpl;
  -import org.jboss.cache.InvocationContext;
  -import org.jboss.cache.CacheSPI;
   import org.jboss.cache.config.Option;
  -import org.jboss.cache.misc.TestingUtil;
   import org.jboss.cache.factories.DefaultCacheFactory;
  +import org.jboss.cache.misc.TestingUtil;
   
  -import java.util.Map;
   import java.util.HashMap;
  +import java.util.Map;
   
   /**
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
    */
   public class SyncReplTest extends TestCase
   {
  -   private Cache[] caches;
  +   private CacheSPI[] caches;
   
      protected void setUp()
      {
         System.out.println("*** In setUp()");
  -      caches = new Cache[2];
  -      caches[0] = new DefaultCacheFactory().createCache("META-INF/replSync-service.xml");
  -      caches[1] = new DefaultCacheFactory().createCache("META-INF/replSync-service.xml");
  +      caches = new CacheSPI[2];
  +      caches[0] = (CacheSPI) new DefaultCacheFactory().createCache("META-INF/replSync-service.xml");
  +      caches[1] = (CacheSPI) new DefaultCacheFactory().createCache("META-INF/replSync-service.xml");
   
         TestingUtil.blockUntilViewsReceived(caches, 5000);
         System.out.println("*** Finished setUp()");
  @@ -96,25 +96,25 @@
         assertClusterSize("Should only be 2  caches in the cluster!!!", 2);
         assertInvocationContextInitState();
   
  -      Fqn fqn = Fqn.fromString("/JSESSIONID/1010.10.5:3000/1234567890/1");
  -      Fqn fqn1 = Fqn.fromString("/JSESSIONID/1010.10.5:3000/1234567890/2");
  +      Fqn fqn = Fqn.fromString("/JSESSIONID/10.10.10.5:3000/1234567890/1");
  +      Fqn fqn1 = Fqn.fromString("/JSESSIONID/10.10.10.5:3000/1234567890/2");
   
         Map map = new HashMap();
         map.put("1", "1");
         map.put("2", "2");
  -      ((CacheSPI)caches[0]).getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  -      caches[0].getRoot().addChild(fqn).put(map);
  -      ((CacheSPI)caches[0]).getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  +      caches[0].getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  +      caches[0].addChild(fqn).put(map);
  +      caches[0].getInvocationContext().getOptionOverrides().setSuppressLocking(true);
         assertEquals("Value should be set", "1", caches[0].get(fqn, "1"));
   
         map = new HashMap();
         map.put("3", "3");
         map.put("4", "4");
  -      ((CacheSPI)caches[0]).getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  -      caches[0].getRoot().addChild(fqn1).put(map);
  -      ((CacheSPI)caches[0]).getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  -      assertEquals("Value should be set", "2", caches[0].get(fqn, "2"));
  +      caches[0].getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  +      caches[0].addChild(fqn1).put(map);
   
  +      caches[0].getInvocationContext().getOptionOverrides().setSuppressLocking(true);
  +      assertEquals("Value should be set", "2", caches[0].get(fqn, "2"));
      }
   
   
  
  
  



More information about the jboss-cvs-commits mailing list