db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1441621 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
Date Fri, 01 Feb 2013 20:40:56 GMT
Author: tfischer
Date: Fri Feb  1 20:40:55 2013
New Revision: 1441621

URL: http://svn.apache.org/viewvc?rev=1441621&view=rev
Log:
mysql does not support any of the Current_* functions for the default mapping

Modified:
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java?rev=1441621&r1=1441620&r2=1441621&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
Fri Feb  1 20:40:55 2013
@@ -9,6 +9,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.adapter.MssqlAdapter;
+import org.apache.torque.adapter.MysqlAdapter;
 import org.apache.torque.adapter.OracleAdapter;
 import org.apache.torque.test.dbobject.JavaDefaultValues;
 
@@ -51,10 +52,11 @@ public class DefaultValuesFromJavaTest e
      */
     public void testCurrentDateAsJavaDefault() throws Exception
     {
-        if (defaultAdapter instanceof MssqlAdapter)
+        if (defaultAdapter instanceof MssqlAdapter
+                || defaultAdapter instanceof MysqlAdapter)
         {
             log.error("testCurrentDateAsJavaDefault(): "
-                + "MSSQL does not support the CURRENT_DATE function");
+                + "MSSQL and Mysql do not support the CURRENT_DATE function");
             return;
         }
         GregorianCalendar currentCalendarBefore = new GregorianCalendar();
@@ -92,10 +94,12 @@ public class DefaultValuesFromJavaTest e
     public void testCurrentTimeAsJavaDefault() throws Exception
     {
         if (defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+                || defaultAdapter instanceof MssqlAdapter
+                || defaultAdapter instanceof MysqlAdapter)
         {
             log.error("testCurrentTimeAsJavaDefault(): "
-                + "Oracle and MSSQL do not support the CURRENT_TIME function");
+                + "Oracle, MSSQL and Mysql do not support "
+                + "the CURRENT_TIME function");
             return;
         }
         GregorianCalendar currentCalendarBefore = new GregorianCalendar();
@@ -121,6 +125,13 @@ public class DefaultValuesFromJavaTest e
      */
     public void testCurrentTimestampAsJavaDefault() throws Exception
     {
+        if (defaultAdapter instanceof MysqlAdapter)
+        {
+            log.error("testCurrentTimestampAsJavaDefault(): "
+                + "Mysql does not support "
+                + "the CURRENT_TIMESTAMP function");
+            return;
+        }
         Date currentDateBefore = new Date();
         JavaDefaultValues javaDefaultValues = new JavaDefaultValues();
         Date currentDateAfter = new Date();



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message