Thanks! I updated the wiki page I started. I assume this is the Database.expireCache() option noted by Bruce?
jeff >>> [EMAIL PROTECTED] 12/04/03 08:40AM >>> Jeff, add the following scenario: * evict the object in question from the cache manually. For this, you'll have to get Castor from CVS and build it yourself as this feature has only been added recently. Werner On Wed, 03 Dec 2003 13:50:11 -0500, Jeffrey Bonevich wrote: >Posted example code on the wiki: > >http://www.brainopolis.com/castorwiki/Wiki.jsp?page=CastorMockObjects > >jeff > >>>> [EMAIL PROTECTED] 12/03/03 01:31PM >>> >Figured out the answer to my own question: > >CastorJDO cacheing is getting in the way of the mock object >expectations, in that because the same object was earlier loaded by >Castor into the same JVM as a different unit test, the second test does > >not actually change the MockPreparedStatement expectation for result >sets returned. Solutions to this problem include: > >* run each unit test in its own JVM (probably the most realistic) >* set cache-type type="none" in the mapping.xml file (I did this and it > >worked) >* have each unit test load a unique object so that cacheing collisions > >do not occur >* account for cacheing as part of unit testing (smacks more of >integration testing at this point, and it would be very difficult to do > >in a consistent, simple manner) > >jeff > >-- >Jeffrey Bonevich >Lead Developer, CareWeb >University of Michigan Health System >Ann Arbor, Michigan >mailto: [EMAIL PROTECTED] > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
