db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mka...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker BlobTest.java
Date Wed, 23 Feb 2005 21:16:16 GMT
mkalen      2005/02/23 13:16:16

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        BlobTest.java
  Log:
  Skip BlobTest for Oracle as known issue, since Torque is generating LONG RAW instead of
BLOB and VARCHAR2(2000) instead of CLOB.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.9.2.1   +20 -11    db-ojb/src/test/org/apache/ojb/broker/BlobTest.java
  
  Index: BlobTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/BlobTest.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- BlobTest.java	23 Jun 2004 10:20:08 -0000	1.9
  +++ BlobTest.java	23 Feb 2005 21:16:16 -0000	1.9.2.1
  @@ -1,20 +1,24 @@
   package org.apache.ojb.broker;
   
  -import java.io.Serializable;
  -
  -import junit.framework.TestCase;
  -import org.apache.ojb.broker.platforms.Platform;
   import org.apache.ojb.broker.platforms.PlatformHsqldbImpl;
   import org.apache.ojb.junit.PBTestCase;
   
  +import java.io.Serializable;
  +
   /**
    * This TestClass tests storimg and retrieving Objects with BLOB/CLOB Attributes.
    * Does currently not work with HSQLDB, as it doen't support Blobs/Clobs.
    */
   public class BlobTest extends PBTestCase
   {
  +    // TODO: resolv according to message string:
  +    private static final String ORACLE_TORQUE_LOB_MESSAGE =
  +            "TODO: Resolv if we can get Torque to generate proper BLOB/CLOB" +
  +            " columns instead of LONG RAW and VARCHAR2(2000).";
  +    private static final String SKIP_MESSAGE =
  +            "# Skip "+BlobTest.class.getName()+", DB does not support Blob/Clob #";
  +
       boolean skipTest;
  -    private static final String msg = "# Skip "+BlobTest.class.getName()+", DB does not
support Blob/Clob #";
   
       public BlobTest(String name)
       {
  @@ -31,11 +35,16 @@
       {
           super.setUp();
   
  -        Platform platform = broker.serviceConnectionManager().getSupportedPlatform();
  +        String platformClass = getPlatformClass();
           /*
           hsqldb does not support Blob/Clob, so we skip test for this DB
           */
  -        if(platform.getClass().equals(PlatformHsqldbImpl.class))
  +        if (platformClass.equals(PlatformHsqldbImpl.class.getName()))
  +        {
  +            skipTest = true;
  +        }
  +        else if (platformClass.startsWith("org.apache.ojb.broker.platforms.PlatformOracle")
  +                 && ojbSkipKnownIssueProblem(ORACLE_TORQUE_LOB_MESSAGE))
           {
               skipTest = true;
           }
  @@ -43,9 +52,9 @@
   
       public void testBlobInsertion() throws Exception
       {
  -        if(skipTest)
  +        if (skipTest)
           {
  -            System.out.println(msg);
  +            System.out.println(SKIP_MESSAGE);
               return;
           }
   
  @@ -79,9 +88,9 @@
   
       public void testReadNullBlob()
       {
  -        if(skipTest)
  +        if (skipTest)
           {
  -            System.out.println(msg);
  +            System.out.println(SKIP_MESSAGE);
               return;
           }
   
  
  
  

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


Mime
View raw message