db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r430915 - /db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java
Date Fri, 11 Aug 2006 23:21:54 GMT
Author: arminw
Date: Fri Aug 11 16:21:53 2006
New Revision: 430915

URL: http://svn.apache.org/viewvc?rev=430915&view=rev
Log:
minor changes

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java?rev=430915&r1=430914&r2=430915&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java
Fri Aug 11 16:21:53 2006
@@ -16,7 +16,6 @@
 import org.apache.ojb.broker.query.QueryByIdentity;
 import org.apache.ojb.broker.sequence.Repository;
 import org.apache.ojb.broker.util.ClassHelper;
-import org.apache.ojb.broker.util.GUID;
 import org.apache.ojb.junit.OJBTestCase;
 
 /**
@@ -232,7 +231,7 @@
             }
             finally
             {
-                jcd.addAttribute(CacheDistributor.CACHE_EXCLUDES_STRING, old);
+                if(old != null) jcd.addAttribute(CacheDistributor.CACHE_EXCLUDES_STRING,
old);
                 if (broker != null) broker.close();
             }
         }
@@ -392,11 +391,9 @@
         Object[] pk = new Object[]{new Long(42)};
         Identity oid = broker1.serviceIdentity().buildIdentity(Article.class, InterfaceArticle.class,
pk);
 
-        GUID guid = new GUID();
-
         Article a1 = (Article) broker1.getObjectByQuery(new QueryByIdentity(oid));
         String originalName = a1.getArticleName();
-        a1.setArticleName(guid.toString());
+        a1.setArticleName("testName");
 
 // start a second transaction
         PersistenceBroker broker2 = PersistenceBrokerFactory.defaultPersistenceBroker();
@@ -404,7 +401,7 @@
 
         Article a2 = (Article) broker2.getObjectByQuery(new QueryByIdentity(oid));
 
-        assertEquals(guid.toString(), a1.getArticleName());
+        assertEquals("testName", a1.getArticleName());
         assertEquals(originalName, a2.getArticleName());
         assertNotSame(a1, a2);
 



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