db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r413955 - /db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/lob/LOBTest.java
Date Tue, 13 Jun 2006 19:11:23 GMT
Author: arminw
Date: Tue Jun 13 12:11:22 2006
New Revision: 413955

URL: http://svn.apache.org/viewvc?rev=413955&view=rev
Log:
update test

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/lob/LOBTest.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/lob/LOBTest.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/lob/LOBTest.java?rev=413955&r1=413954&r2=413955&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/lob/LOBTest.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/lob/LOBTest.java Tue Jun
13 12:11:22 2006
@@ -148,14 +148,24 @@
         assertNotNull("BLOB was not stored", objRead.getBlob());
         assertNotNull("CLOB was not stored", objRead.getClob());
 
+        // now update object without refreshed LOB content - autoRefresh is disabled
         try
         {
             broker.store(obj, ObjectModification.UPDATE);
+            fail("LobException expected");
         }
         catch(LobException expected)
         {
+            // expected exception
+            //expected.printStackTrace();
             broker.abortTransaction();
+            broker.beginTransaction();
         }
+
+        broker.serviceLobHelper().setLobAutoRefresh(true);
+        objRead = (LobObject) broker.getObjectByIdentity(oid);
+        assertNotNull("unexpected, BLOB was deleted", objRead.getBlob());
+        assertNotNull("unexpected, CLOB was deleted", objRead.getClob());
 
         if(broker.isInTransaction()) broker.abortTransaction();
     }



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