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

Jason Thomas Greene jgreene at jboss.com
Tue Apr 24 09:16:10 EDT 2007


  User: jgreene 
  Date: 07/04/24 09:16:09

  Modified:    tests/functional/org/jboss/cache/pojo 
                        NewReplicatedTest.java
  Log:
  Exclude state transfer test
  Use localhost on one-test-pojocache
  Change NewReplicatedTest.testPutArray2 to use a serializable type (now required)
  
  Revision  Changes    Path
  1.4       +20 -11    JBossCache/tests/functional/org/jboss/cache/pojo/NewReplicatedTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NewReplicatedTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/NewReplicatedTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- NewReplicatedTest.java	16 Apr 2007 17:37:10 -0000	1.3
  +++ NewReplicatedTest.java	24 Apr 2007 13:16:09 -0000	1.4
  @@ -14,6 +14,8 @@
   import org.jboss.cache.pojo.test.Address;
   
   import javax.naming.Context;
  +
  +import java.io.Serializable;
   import java.util.Properties;
   
   
  @@ -204,25 +206,32 @@
         assertEquals("arr 0", 1, a2[0]);
      }
   
  +   public static class PersonSerial implements Serializable
  +   {
  +      public String name;
  +      public int age;
  +      
  +      public PersonSerial(String name, int age)
  +      {
  +         this.name = name;
  +         this.age = age;
  +      }
  +   }
  +   
      public void testPutArray2() throws Exception
      {
         log_.info("testPutArray2() ....");
  -      Person p1 = new Person();
  -      p1.setName("Ben");
  -      p1.setAge(10);
  -
  -      Person p2 = new Person();
  -      p2.setName("Joe");
  -      p2.setAge(20);
  -      Person[] arr = new Person[]{p1, p2};
  +      PersonSerial p1 = new PersonSerial("Ben", 10);
  +
  +      PersonSerial p2 = new PersonSerial("Joe", 20);
  +      PersonSerial[] arr = new PersonSerial[]{p1, p2};
   
         cache_.attach("array", arr);
   
  -      Person[] a2 = (Person[]) cache1_.find("array");
  -      assertEquals("arr 0", "Ben", a2[0].getName());
  +      PersonSerial[] a2 = (PersonSerial[]) cache1_.find("array");
  +      assertEquals("arr 0", "Ben", a2[0].name);
      }
   
  -
      /**
       * JBCACHE-200.
       *
  
  
  



More information about the jboss-cvs-commits mailing list