epugh       2004/11/06 03:37:45

  Modified:    cache    project.xml
               cache/src/test/org/apache/fulcrum/cache CacheTest.java
               cache/xdocs changes.xml
  Log:
  Make long running tests optional (and off by default)
  
  Revision  Changes    Path
  1.11      +6 -0      jakarta-turbine-fulcrum/cache/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/cache/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml       1 Nov 2004 13:29:24 -0000       1.10
  +++ project.xml       6 Nov 2004 11:37:45 -0000       1.11
  @@ -6,6 +6,12 @@
     <currentVersion>1.0.4</currentVersion>
   
     <dependencies>        
  +    <dependency>
  +      <groupId>commons-logging</groupId>
  +      <artifactId>commons-logging</artifactId>
  +      <version>1.0.3</version>
  +    </dependency>
  +    
       <!--  Needed only for testing -->
       <dependency>
         <groupId>fulcrum</groupId>
  
  
  
  1.6       +13 -11    
jakarta-turbine-fulcrum/cache/src/test/org/apache/fulcrum/cache/CacheTest.java
  
  Index: CacheTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-fulcrum/cache/src/test/org/apache/fulcrum/cache/CacheTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CacheTest.java    4 Nov 2004 21:34:07 -0000       1.5
  +++ CacheTest.java    6 Nov 2004 11:37:45 -0000       1.6
  @@ -60,6 +60,8 @@
   import java.util.List;
   
   import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.apache.fulcrum.testcontainer.BaseUnitTest;
   /**
    * CacheTest
  @@ -76,6 +78,7 @@
       private static final String cacheKey = "CacheKey";
       private static final String cacheKey_2 = "CacheKey_2";
       public static final String SKIP_TESTS_KEY = "fulcrum.cache.skip.long.tests";
  +    private static final Log LOG = LogFactory.getLog(CacheTest.class);
       
   
       /**
  @@ -401,6 +404,13 @@
        */
       public void testRefreshableTimeToLive() throws Exception
       {
  +        String skipTestsProperty = System.getProperty(SKIP_TESTS_KEY,"false");
  +        LOG.info("What is the skipTestsProperty:" + skipTestsProperty);
  +        if(Boolean.getBoolean(skipTestsProperty)==true){
  +            LOG.warn("Skipping testRefreshableTimeToLive tests due to property " + 
SKIP_TESTS_KEY + " being true.");
  +            return;
  +        }
  +
           String testString = new String("This is a test");
           Object retrievedObject = null;
           RefreshableCachedObject cacheObject = null;
  @@ -564,16 +574,8 @@
        * @return the refresh requency in milliseconds
        */
       private long getCacheRefresh()
  -    {
  -        String skipTestsProperty = System.getProperty(SKIP_TESTS_KEY,"false");
  -        System.out.println("What is the skipTestsProperty:" + skipTestsProperty);
  -        if(Boolean.getBoolean(skipTestsProperty)==true){
  -            return 0;
  -        }
  -        else {
  -            return ((DefaultGlobalCacheService) 
globalCache).getCacheCheckFrequency()*1000;
  -        }
  -        
  +    {        
  +        return ((DefaultGlobalCacheService) 
globalCache).getCacheCheckFrequency()*1000;       
       }
       
       /** 
  
  
  
  1.5       +3 -0      jakarta-turbine-fulcrum/cache/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/cache/xdocs/changes.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- changes.xml       20 Oct 2004 12:57:34 -0000      1.4
  +++ changes.xml       6 Nov 2004 11:37:45 -0000       1.5
  @@ -8,6 +8,9 @@
     <body>
       <release version="1.0.4" date="">
        <action dev="epugh" type="update">
  +        Make long running tests optional.  They often fail for random reasons.
  +      </action>            
  +     <action dev="epugh" type="update">
           Remove extra dependencies.
         </action>        
         <action dev="epugh" type="add">
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to