db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject cvs commit: db-torque/src/rttest/org/apache/torque DataTest.java
Date Thu, 09 Jun 2005 21:22:15 GMT
tfischer    2005/06/09 14:22:15

  Modified:    src/rttest/org/apache/torque DataTest.java
  Log:
  Get runtimetest working for HSQLDB:
  - skip Join Test becauseHSQLDB does not support right joins
  - clean A table each time before saving
  
  Revision  Changes    Path
  1.23      +15 -1     db-torque/src/rttest/org/apache/torque/DataTest.java
  
  Index: DataTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/rttest/org/apache/torque/DataTest.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DataTest.java	8 Jun 2005 06:08:47 -0000	1.22
  +++ DataTest.java	9 Jun 2005 21:22:14 -0000	1.23
  @@ -28,9 +28,11 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.torque.adapter.DBHypersonicSQL;
   import org.apache.torque.adapter.DBOracle;
   import org.apache.torque.om.StringKey;
   import org.apache.torque.test.A;
  +import org.apache.torque.test.APeer;
   import org.apache.torque.test.Author;
   import org.apache.torque.test.AuthorPeer;
   import org.apache.torque.test.BitTest;
  @@ -403,6 +405,13 @@
        */
       public void testJoins() throws Exception
       {
  +        if (Torque.getDB(Torque.getDefaultDB()) instanceof DBHypersonicSQL)
  +        {
  +            log.error("testJoins(): Right joins are not supported by HSQLDB");
  +            // failing is "expected", so exit without error
  +            return;
  +        }
  +
           cleanBookstore();
   
           // insert test data
  @@ -940,6 +949,11 @@
        */
       public void testSingleQuotes() throws Exception
       {
  +        // clean A table
  +        Criteria criteria = new Criteria();
  +        criteria.add(APeer.A_ID, (Long) null, Criteria.NOT_EQUAL);
  +        APeer.doDelete(criteria);
  +        
           A a = new A();
           a.setName("has Single ' Quote");
           a.save();
  
  
  

---------------------------------------------------------------------
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