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

Manik Surtani msurtani at jboss.com
Thu Jul 20 06:59:14 EDT 2006


  User: msurtani
  Date: 06/07/20 06:59:14

  Modified:    tests/functional/org/jboss/cache/loader  
                        ClusteredCacheLoaderTest.java
                        JDBCCacheLoaderTest.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.8       +11 -6     JBossCache/tests/functional/org/jboss/cache/loader/ClusteredCacheLoaderTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ClusteredCacheLoaderTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/ClusteredCacheLoaderTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- ClusteredCacheLoaderTest.java	24 Jan 2006 17:27:25 -0000	1.7
  +++ ClusteredCacheLoaderTest.java	20 Jul 2006 10:59:14 -0000	1.8
  @@ -9,6 +9,7 @@
   import junit.framework.Assert;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.TreeCache;
  +import org.jboss.cache.config.Configuration;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -31,14 +32,18 @@
       protected void setUp() throws Exception
       {
           if (cache1 != null || cache2 != null) tearDown();
  -        cache1 = new TreeCache("CCL-Test", null, 2000);
  -        cache2 = new TreeCache("CCL-Test", null, 2000);
  +        cache1 = new TreeCache();
  +        cache2 = new TreeCache();
   
  -        cache1.setCacheMode(TreeCache.REPL_SYNC);
  -        cache2.setCacheMode(TreeCache.REPL_SYNC);
  +        cache1.getConfiguration().setClusterName("CCL-Test");
  +        cache1.getConfiguration().setInitialStateRetrievalTimeout(2000);
  +        cache2.getConfiguration().setClusterName("CCL-Test");
  +        cache2.getConfiguration().setInitialStateRetrievalTimeout(2000);
  +        cache1.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
  +        cache2.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
   
  -        cache1.setCacheLoaderConfiguration( getSingleCacheLoaderConfig("", "org.jboss.cache.loader.ClusteredCacheLoader", "timeout=500", false, false, false) );
  -        cache2.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.ClusteredCacheLoader", "timeout=500", false, false, false));
  +        cache1.getConfiguration().setCacheLoaderConfiguration( getSingleCacheLoaderConfig("", "org.jboss.cache.loader.ClusteredCacheLoader", "timeout=500", false, false, false) );
  +        cache2.getConfiguration().setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.ClusteredCacheLoader", "timeout=500", false, false, false));
   
           cache1.startService();
           cache2.startService();
  
  
  
  1.6       +2 -2      JBossCache/tests/functional/org/jboss/cache/loader/JDBCCacheLoaderTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JDBCCacheLoaderTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/JDBCCacheLoaderTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- JDBCCacheLoaderTest.java	31 Jan 2006 18:29:22 -0000	1.5
  +++ JDBCCacheLoaderTest.java	20 Jul 2006 10:59:14 -0000	1.6
  @@ -23,7 +23,7 @@
    * must be in the lib directory.
    * 
    * @author <a href="hmesha at novell.com">Hany Mesha</a>
  - * @version <tt>$Revision: 1.5 $</tt>
  + * @version <tt>$Revision: 1.6 $</tt>
    */
   public class JDBCCacheLoaderTest
      extends CacheLoaderTestsBase
  @@ -41,7 +41,7 @@
                        "cache.jdbc.user=" + prop.getProperty("cache.jdbc.user") + "\n" +
                        "cache.jdbc.password=" + prop.getProperty("cache.jdbc.password") + "\n" +
                        "cache.jdbc.node.type=" + prop.getProperty("cache.jdbc.node.type");
  -      cache.setCacheLoaderConfiguration( getSingleCacheLoaderConfig("", "org.jboss.cache.loader.JDBCCacheLoader", props, false, true, false) );
  +      cache.getConfiguration().setCacheLoaderConfiguration( getSingleCacheLoaderConfig("", "org.jboss.cache.loader.JDBCCacheLoader", props, false, true, false) );
      }
      
      public void testLargeObject()
  
  
  



More information about the jboss-cvs-commits mailing list