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

Ben Wang bwang at jboss.com
Thu Nov 9 23:02:06 EST 2006


  User: bwang   
  Date: 06/11/09 23:02:06

  Modified:    tests/functional/org/jboss/cache/aop/collection  Tag:
                        Branch_JBossCache_1_4_0 CachedListImplAopTest.java
  Log:
  Added test for proxy serialization.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +29 -3     JBossCache/tests/functional/org/jboss/cache/aop/collection/Attic/CachedListImplAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CachedListImplAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/collection/Attic/CachedListImplAopTest.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -b -r1.2 -r1.2.2.1
  --- CachedListImplAopTest.java	9 Apr 2006 12:33:49 -0000	1.2
  +++ CachedListImplAopTest.java	10 Nov 2006 04:02:06 -0000	1.2.2.1
  @@ -7,6 +7,10 @@
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.aop.PojoCache;
   import org.jboss.cache.PropertyConfigurator;
  +import org.jboss.cache.Fqn;
  +
  +import java.util.List;
  +import java.util.ArrayList;
   
   //import org.jboss.test.JBossTestCase;
   
  @@ -18,23 +22,27 @@
   public class CachedListImplAopTest extends TestCase
   {
      Log log=LogFactory.getLog(CachedListImplAopTest.class);
  -   PojoCache cache_;
  +   PojoCache cache_, cache1_;
   
      public CachedListImplAopTest(String name)
      {
         super(name);
      }
   
  -
      protected void setUp() throws Exception
      {
         super.setUp();
         log.info("setUp() ....");
  -      String configFile = "META-INF/local-service.xml";
  +      String configFile = "META-INF/replSync-service.xml";
         cache_ = new PojoCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache_, configFile); // read in generic replSync xml
         cache_.start();
  +
  +      cache1_ = new PojoCache();
  +      config = new PropertyConfigurator();
  +      config.configure(cache1_, configFile); // read in generic replSync xml
  +      cache1_.start();
      }
   
      protected void tearDown() throws Exception
  @@ -48,6 +56,24 @@
   
      }
   
  +   public void testSimpleRepl() throws Exception
  +   {
  +      List list = new ArrayList();
  +      list.add("1");
  +      list.add("2");
  +
  +      cache_.putObject("/list", list);
  +
  +      // proxy now
  +      list = (List)cache_.getObject("/list");
  +
  +      // test repl
  +      cache_.put(Fqn.fromString("/test"), "1", list);
  +
  +      ArrayList l1 = (ArrayList)cache1_.get(Fqn.fromString("test"), "1");
  +      System.out.println(" list : " +l1);
  +   }
  +
      public static Test suite() throws Exception
      {
         return new TestSuite(CachedListImplAopTest.class);
  
  
  



More information about the jboss-cvs-commits mailing list