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

Manik Surtani msurtani at jboss.com
Sat Dec 30 14:48:47 EST 2006


  User: msurtani
  Date: 06/12/30 14:48:47

  Modified:    tests/functional/org/jboss/cache/replicated 
                        AsyncReplTest.java
  Log:
  Genericised, autoboxed
  
  Revision  Changes    Path
  1.13      +8 -8      JBossCache/tests/functional/org/jboss/cache/replicated/AsyncReplTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AsyncReplTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/replicated/AsyncReplTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- AsyncReplTest.java	30 Dec 2006 17:50:05 -0000	1.12
  +++ AsyncReplTest.java	30 Dec 2006 19:48:47 -0000	1.13
  @@ -24,7 +24,7 @@
    * Unit test for replicated async CacheImpl. Use locking and multiple threads to test
    * concurrent access to the tree.
    *
  - * @version $Revision: 1.12 $
  + * @version $Revision: 1.13 $
    */
   public class AsyncReplTest extends TestCase
   {
  @@ -134,7 +134,7 @@
         try
         {
            cache3 = createCache("DifferentGroup");
  -         cache1.put("/a/b/c", "age", new Integer(38));
  +         cache1.put("/a/b/c", "age", 38);
            // because we use async repl, modfication may not yet have been propagated to cache2, so
            // we have to wait a little
            TestingUtil.sleepThread((long) 1000);
  @@ -158,11 +158,11 @@
         CacheImpl cache4 = null;
         try
         {
  -         cache1.put("a/b/c", "age", new Integer(38));
  +         cache1.put("a/b/c", "age", 38);
            cache4 = createCache("CacheGroup");
            System.out.println("" + cache4.getMembers());
            assertEquals(3, cache4.getMembers().size()); // cache1, cache2 and cache4
  -         assertEquals("\"age\" should be 38", new Integer(38), cache4.get("/a/b/c", "age"));
  +         assertEquals("\"age\" should be 38", 38, cache4.get("/a/b/c", "age"));
         }
         catch (Exception e)
         {
  @@ -185,12 +185,12 @@
   
         try
         {
  -         cache1.put("/a/b/c", "age", new Integer(38));
  +         cache1.put("/a/b/c", "age", 38);
   
            // value on cache2 may be 38 or not yet replicated
            age = (Integer) cache2.get("/a/b/c", "age");
            log("attr \"age\" of \"/a/b/c\" on cache2=" + age);
  -         assertTrue("should be either null or 38", age == null || age.intValue() == 38);
  +         assertTrue("should be either null or 38", age == null || age == 38);
         }
         catch (Exception e)
         {
  @@ -206,13 +206,13 @@
         {
            TransactionManager tm = cache1.getTransactionManager();
            tm.begin();
  -         cache1.put("/a/b/c", "age", new Integer(38));
  +         cache1.put("/a/b/c", "age", 38);
            tm.commit();
   
            // value on cache2 may be 38 or not yet replicated
            age = (Integer) cache2.get("/a/b/c", "age");
            log("attr \"age\" of \"/a/b/c\" on cache2=" + age);
  -         assertTrue("should be either null or 38", age == null || age.intValue() == 38);
  +         assertTrue("should be either null or 38", age == null || age == 38);
         }
         catch (Exception e)
         {
  
  
  



More information about the jboss-cvs-commits mailing list