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

Manik Surtani manik at jboss.org
Tue May 29 09:07:41 EDT 2007


  User: msurtani
  Date: 07/05/29 09:07:41

  Modified:    tests/functional/org/jboss/cache/invalidation 
                        InvalidationInterceptorTest.java
  Log:
  created a dummy in memory CL to act as a stub for tests that assume the rpesence of a cache loader
  
  Revision  Changes    Path
  1.22      +2 -32     JBossCache/tests/functional/org/jboss/cache/invalidation/InvalidationInterceptorTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InvalidationInterceptorTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/invalidation/InvalidationInterceptorTest.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- InvalidationInterceptorTest.java	7 Feb 2007 22:06:51 -0000	1.21
  +++ InvalidationInterceptorTest.java	29 May 2007 13:07:41 -0000	1.22
  @@ -7,10 +7,7 @@
   package org.jboss.cache.invalidation;
   
   import junit.framework.Assert;
  -import junit.framework.Test;
   import junit.framework.TestCase;
  -import junit.framework.TestSuite;
  -import junit.textui.TestRunner;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.CacheImpl;
  @@ -26,7 +23,6 @@
   import javax.transaction.RollbackException;
   import javax.transaction.Transaction;
   import javax.transaction.TransactionManager;
  -import java.io.File;
   
   /**
    * Tests the async interceptor
  @@ -611,15 +607,11 @@
      protected CacheLoaderConfig getCacheLoaderConfig() throws Exception
      {
         String xml = "            <config>\n" +
  -              "                \n" +
  +              "                <shared>shared</shared>\n" +
                 "                <passivation>false</passivation>\n" +
                 "                <preload></preload>\n" +
  -              "\n" +
                 "                <cacheloader>\n" +
  -              "                    <class>org.jboss.cache.loader.FileCacheLoader</class>\n" +
  -              "                    <properties>\n" +
  -              "                        location=" + getTempDir() + "\n" +
  -              "                    </properties>\n" +
  +              "                    <class>org.jboss.cache.loader.DummySharedInMemoryCacheLoader</class>\n" +
                 "                    <async>false</async>\n" +
                 "                    <fetchPersistentState>false</fetchPersistentState>\n" +
                 "                    <ignoreModifications>false</ignoreModifications>\n" +
  @@ -629,26 +621,4 @@
         Element element = XmlHelper.stringToElement(xml);
         return XmlConfigurationParser.parseCacheLoaderConfig(element);
      }
  -
  -   protected String getTempDir()
  -   {
  -      String name = "cacheloader";
  -      String tempDir = System.getProperty("java.io.tmpdir", "/tmp") + File.separator + "JBossCache-InvalidationInterceptorTestCase-WorkingDir" + File.separator + name;
  -      File tempDirFile = new File(tempDir);
  -      if (!tempDirFile.exists())
  -      {
  -         tempDirFile.mkdirs();
  -      }
  -      return tempDir;
  -   }
  -
  -   public static void main(String[] args)
  -   {
  -      TestRunner.run(suite());
  -   }
  -
  -   public static Test suite()
  -   {
  -      return new TestSuite(InvalidationInterceptorTest.class);
  -   }
   }
  
  
  



More information about the jboss-cvs-commits mailing list