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 OptimisticLockingTest.java
Date Wed, 23 Feb 2005 22:10:15 GMT
mkalen      2005/02/23 14:10:15

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        OptimisticLockingTest.java
  Log:
  Skip the whole testTimestampLock on Oracle (until TIMESTAMP issue is resolved) to avoid
undeterministic test behaviour and occasional failures.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.10.2.4  +11 -5     db-ojb/src/test/org/apache/ojb/broker/OptimisticLockingTest.java
  
  Index: OptimisticLockingTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/OptimisticLockingTest.java,v
  retrieving revision 1.10.2.3
  retrieving revision 1.10.2.4
  diff -u -r1.10.2.3 -r1.10.2.4
  --- OptimisticLockingTest.java	23 Feb 2005 20:37:08 -0000	1.10.2.3
  +++ OptimisticLockingTest.java	23 Feb 2005 22:10:15 -0000	1.10.2.4
  @@ -7,6 +7,7 @@
    */
   public class OptimisticLockingTest extends PBTestCase
   {
  +    // TODO: resolv this:
       private static final String ORACLE_TORQUE_TIMETSAMP =
               "TODO: Resolv if we can get Torque to generate proper TIMESTAMP" +
               " columns instead of DATE (NB: TIMESTAMP is introduced in Orcale 9).";
  @@ -120,6 +121,16 @@
   /** Test optimistic Lock by timestamp.*/
   	public void testTimestampLock() throws Exception
   	{
  +        // mkalen: Torque will produce DATE in DDL when using Oracle so
  +        //          we only get second (sic!) precision on the lock.
  +        //          Skip test to avoid undeterministic behaviour (until we can get
  +        //          proper DDL with TIMESTAMP).
  +        if (getPlatformClass().startsWith("org.apache.ojb.broker.platforms.PlatformOracle")
  +            && ojbSkipKnownIssueProblem(ORACLE_TORQUE_TIMETSAMP))
  +        {
  +                return;
  +        }
  +
   		LockedByTimestamp obj = new LockedByTimestamp();
           obj.setValue("original");
           Identity oid = new Identity(obj, broker);
  @@ -156,11 +167,6 @@
               broker.store(copy2);
               broker.commitTransaction();
   
  -            if (getPlatformClass().startsWith("org.apache.ojb.broker.platforms.PlatformOracle")
  -                && ojbSkipKnownIssueProblem(ORACLE_TORQUE_TIMETSAMP))
  -            {
  -                    return;
  -            }
               fail("Should throw an Optimistic Lock exception");
           }
           catch (OptimisticLockException ex)
  
  
  

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