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

Manik Surtani msurtani at jboss.com
Tue Oct 31 12:35:31 EST 2006


  User: msurtani
  Date: 06/10/31 12:35:31

  Modified:    tests/functional/org/jboss/cache/eviction  Tag:
                        Branch_JBossCache_1_4_0 ConcurrentEvictionTest.java
  Log:
  Updated
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +24 -11    JBossCache/tests/functional/org/jboss/cache/eviction/ConcurrentEvictionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConcurrentEvictionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ConcurrentEvictionTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -b -r1.1.2.2 -r1.1.2.3
  --- ConcurrentEvictionTest.java	26 Oct 2006 18:36:34 -0000	1.1.2.2
  +++ ConcurrentEvictionTest.java	31 Oct 2006 17:35:31 -0000	1.1.2.3
  @@ -7,21 +7,20 @@
   
   package org.jboss.cache.eviction;
   
  -import java.util.Properties;
  -
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  -
   import org.jboss.cache.Fqn;
   import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.TreeCache;
   
  +import java.io.File;
  +
   /**
    * Tests cache behavior in the presence of concurrent passivation.
    * 
    * @author Brian Stansberry
  - * @version $Revision: 1.1.2.2 $
  + * @version $Revision: 1.1.2.3 $
    */
   public class ConcurrentEvictionTest extends TestCase
   {
  @@ -45,6 +44,7 @@
   
      void initCaches() throws Exception
      {
  +      removeStaleFiles();
         cache_ = new TreeCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache_, "META-INF/local-eviction-cacheloader-service.xml"); // read in generic local xml
  @@ -55,7 +55,20 @@
      public void tearDown() throws Exception
      {
         super.tearDown();
  -      cache_.stopService();
  +      removeStaleFiles();
  +      cache_.stop();
  +      cache_ = null;
  +   }
  +
  +   private void removeStaleFiles()
  +   {
  +      File file = new File("/tmp/JBossCacheFileCacheLoader");
  +      if (file.exists())
  +      {
  +         System.out.println("Deleting file " + file);
  +         file.deleteOnExit();
  +         System.out.println(file.delete());
  +      }
      }
      
      public void testConcurrentEviction() throws Exception
  
  
  



More information about the jboss-cvs-commits mailing list