commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1195231 - in /commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc: JDBCDiskCacheRemovalUnitTest.java JDBCDiskCacheShrinkUnitTest.java mysql/MySQLDiskCacheHsqlBackedUnitTest.java
Date Sun, 30 Oct 2011 19:32:32 GMT
Author: tv
Date: Sun Oct 30 19:32:32 2011
New Revision: 1195231

URL: http://svn.apache.org/viewvc?rev=1195231&view=rev
Log:
Change DB type of column CREATE_TIME to TIMESTAMP, Rename column CREATE_TIME_SECONDS to UPDATE_TIME_SECONDS.
Fixes JCS-84

Modified:
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java?rev=1195231&r1=1195230&r2=1195231&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
Sun Oct 30 19:32:32 2011
@@ -34,7 +34,7 @@ public class JDBCDiskCacheRemovalUnitTes
     extends TestCase
 {
     /** db name -- set in system props */
-    private String databaseName = "JCS_STORE_REMOVAL";
+    private final String databaseName = "JCS_STORE_REMOVAL";
 
     /**
      * Test setup
@@ -49,7 +49,7 @@ public class JDBCDiskCacheRemovalUnitTes
      * Verify the fix for BUG JCS-20
      * <p>
      * Setup an hsql db. Add an item. Remove using partial key.
-     * @throws Exception 
+     * @throws Exception
      */
     public void testPartialKeyRemoval_Good()
         throws Exception
@@ -81,9 +81,9 @@ public class JDBCDiskCacheRemovalUnitTes
 
     /**
      * Create the database.
-     * @throws InstantiationException 
-     * @throws IllegalAccessException 
-     * @throws ClassNotFoundException 
+     * @throws InstantiationException
+     * @throws IllegalAccessException
+     * @throws ClassNotFoundException
      * @throws SQLException
      */
     private void setupDatabase()
@@ -121,8 +121,8 @@ public class JDBCDiskCacheRemovalUnitTes
         createSql.append( "CACHE_KEY             VARCHAR(250)          NOT NULL, " );
         createSql.append( "REGION                VARCHAR(250)          NOT NULL, " );
         createSql.append( "ELEMENT               BINARY, " );
-        createSql.append( "CREATE_TIME           DATE, " );
-        createSql.append( "CREATE_TIME_SECONDS   BIGINT, " );
+        createSql.append( "CREATE_TIME           TIMESTAMP, " );
+        createSql.append( "UPDATE_TIME_SECONDS   BIGINT, " );
         createSql.append( "MAX_LIFE_SECONDS      BIGINT, " );
         createSql.append( "SYSTEM_EXPIRE_TIME_SECONDS      BIGINT, " );
         createSql.append( "IS_ETERNAL            CHAR(1), " );

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java?rev=1195231&r1=1195230&r2=1195231&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
Sun Oct 30 19:32:32 2011
@@ -226,8 +226,8 @@ public class JDBCDiskCacheShrinkUnitTest
         createSql.append( "CACHE_KEY             VARCHAR(250)          NOT NULL, " );
         createSql.append( "REGION                VARCHAR(250)          NOT NULL, " );
         createSql.append( "ELEMENT               BINARY, " );
-        createSql.append( "CREATE_TIME           DATE, " );
-        createSql.append( "CREATE_TIME_SECONDS   BIGINT, " );
+        createSql.append( "CREATE_TIME           TIMESTAMP, " );
+        createSql.append( "UPDATE_TIME_SECONDS   BIGINT, " );
         createSql.append( "MAX_LIFE_SECONDS      BIGINT, " );
         createSql.append( "SYSTEM_EXPIRE_TIME_SECONDS      BIGINT, " );
         createSql.append( "IS_ETERNAL            CHAR(1), " );

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java?rev=1195231&r1=1195230&r2=1195231&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
Sun Oct 30 19:32:32 2011
@@ -73,7 +73,7 @@ public class MySQLDiskCacheHsqlBackedUni
     {
         JCS.setConfigFilename( "/TestMySQLDiskCache.ccf" );
     }
-    
+
     /**
      * Test the basic JDBC disk cache functionality with a hsql backing.
      * @throws Exception
@@ -158,22 +158,22 @@ public class MySQLDiskCacheHsqlBackedUni
         String region = "testCache2";
         JCS jcs = JCS.getInstance( region );
         System.out.println( "BEFORE PUT \n" + jcs.getStats() );
-        
+
         // DO WORK
         for ( int i = 0; i <= items; i++ )
         {
             jcs.put( i + ":key", region + " data " + i );
         }
         Thread.sleep( 1000 );
-        
+
         Map matchingResults = jcs.getMatchingCacheElements( "1.8.+" );
-        
+
         // VERIFY
         assertEquals( "Wrong number returned", 10, matchingResults.size() );
-        System.out.println( "matchingResults.keySet() " + matchingResults.keySet() );   
    
+        System.out.println( "matchingResults.keySet() " + matchingResults.keySet() );
         System.out.println( "\nAFTER TEST \n" + jcs.getStats() );
     }
-    
+
     /**
      * SETUP TABLE FOR CACHE
      * @param cConn
@@ -188,8 +188,8 @@ public class MySQLDiskCacheHsqlBackedUni
         createSql.append( "CACHE_KEY             VARCHAR(250)          NOT NULL, " );
         createSql.append( "REGION                VARCHAR(250)          NOT NULL, " );
         createSql.append( "ELEMENT               BINARY, " );
-        createSql.append( "CREATE_TIME           DATE, " );
-        createSql.append( "CREATE_TIME_SECONDS   BIGINT, " );
+        createSql.append( "CREATE_TIME           TIMESTAMP, " );
+        createSql.append( "UPDATE_TIME_SECONDS   BIGINT, " );
         createSql.append( "MAX_LIFE_SECONDS      BIGINT, " );
         createSql.append( "SYSTEM_EXPIRE_TIME_SECONDS      BIGINT, " );
         createSql.append( "IS_ETERNAL            CHAR(1), " );



Mime
View raw message