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

Manik Surtani manik at jboss.org
Fri Jun 8 12:33:32 EDT 2007


  User: msurtani
  Date: 07/06/08 12:33:32

  Modified:    tests/functional/org/jboss/cache/loader 
                        CacheLoaderWithReplicationTest.java
  Log:
  Converted to use DummyInMemoryCacheLoader
  
  Revision  Changes    Path
  1.29      +2 -36     JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLoaderWithReplicationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- CacheLoaderWithReplicationTest.java	7 Feb 2007 22:06:49 -0000	1.28
  +++ CacheLoaderWithReplicationTest.java	8 Jun 2007 16:33:32 -0000	1.29
  @@ -18,7 +18,6 @@
   import org.jboss.cache.misc.TestingUtil;
   
   import javax.transaction.TransactionManager;
  -import java.io.File;
   
   /**
    * Tests using cache loaders with replicating data
  @@ -28,37 +27,20 @@
   public class CacheLoaderWithReplicationTest extends AbstractCacheLoaderTestBase
   {
      private CacheImpl cache1, cache2;
  -   private String tmpLocation1 = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-CacheLoaderWithReplicationTest1";
  -   private String tmpLocation2 = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-CacheLoaderWithReplicationTest2";
  -   private File dir1 = new File(tmpLocation1);
  -   private File dir2 = new File(tmpLocation2);
      private Fqn fqn = Fqn.fromString("/a");
      private String key = "key";
   
      private static final Log log = LogFactory.getLog(CacheLoaderWithReplicationTest.class);
   
   
  -   public CacheLoaderWithReplicationTest()
  -   {
  -      recursivedelete(dir1);
  -      recursivedelete(dir2);
  -
  -      if (!dir1.exists()) dir1.mkdirs();
  -      if (!dir2.exists()) dir2.mkdirs();
  -
  -      log.debug("   System props dump: " + System.getProperties());
  -      log.debug("Using location for CL 1 : " + tmpLocation1);
  -      log.debug("Using location for CL 2 : " + tmpLocation2);
  -   }
  -
      public void setUp() throws Exception
      {
         cache1 = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
  -      cache1.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + tmpLocation1, false, true, false));
  +      cache1.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.DummyInMemoryCacheLoader", null, false, true, false));
         cache1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
   
         cache2 = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
  -      cache2.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + tmpLocation2, false, true, false));
  +      cache2.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.DummyInMemoryCacheLoader", null, false, true, false));
         cache2.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      }
   
  @@ -92,22 +74,6 @@
            }
   
         }
  -      recursivedelete(dir1);
  -      recursivedelete(dir2);
  -   }
  -
  -   private void recursivedelete(File f)
  -   {
  -      if (f.isDirectory())
  -      {
  -         File[] files = f.listFiles();
  -         for (int i = 0; i < files.length; i++)
  -         {
  -            recursivedelete(files[i]);
  -         }
  -      }
  -      //System.out.println("File " + f.toURI() + " deleted = " + f.delete());
  -      f.delete();
      }
   
      public void testPessSyncRepl() throws Exception
  
  
  



More information about the jboss-cvs-commits mailing list