db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker OptimisticLockingTest.java
Date Fri, 30 Jul 2004 23:23:43 GMT
arminw      2004/07/30 16:23:43

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        OptimisticLockingTest.java
  Log:
  merge with head, abort failed tx
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.10.2.1  +4 -3      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
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- OptimisticLockingTest.java	31 May 2004 22:57:21 -0000	1.10
  +++ OptimisticLockingTest.java	30 Jul 2004 23:23:43 -0000	1.10.2.1
  @@ -1,6 +1,5 @@
   package org.apache.ojb.broker;
   
  -import org.apache.ojb.broker.util.logging.LoggerFactory;
   import org.apache.ojb.junit.PBTestCase;
   
   /**
  @@ -54,6 +53,7 @@
           {
               assertTrue(true);
               //LoggerFactory.getDefaultLogger().debug(ex);
  +            broker.abortTransaction();
               return;
           }
           fail("Should throw an Optimistic Lock exception");
  @@ -149,7 +149,8 @@
           }
           catch (OptimisticLockException ex)
           {
  -            LoggerFactory.getDefaultLogger().debug("Expected otimistic locking exception",ex);
  +            assertTrue(true);
  +            broker.abortTransaction();
           }
   
           if(!broker.isInTransaction()) broker.beginTransaction();
  @@ -168,7 +169,7 @@
              // 
              // fail("If an object which use optimistic locking was deleted two times, OJB"
+
              //         " should not throw an optimistic locking exception: "+e.getMessage());
  -           System.out.println(e.getMessage()); 
  +            broker.abortTransaction();
              return;
           }
           fail("Should throw an Optimistic Lock exception");
  
  
  

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