db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Cleanup in models.fieldtypes.Test*.java
Date Wed, 21 Sep 2005 23:42:02 GMT

I've noticed that the fieldtypes tests, all created on the same pattern, 
delete the persistent instance that they create at the end of the test.  
(For example, 

Now that we use the new cleanup mechanism (addTearDownClass(Class)), 
there doesn't seem to be any point to deleting the instance.  Also, the 
new maven option jdo.tck.cleanupaftertest cannot override this cleanup, 
so you can never see the database contents for debugging.  Therefore, I 
think we should remove the line that deletes the persistent instance.

What about the finally block in these tests?
finally {
            if ((tx != null) && tx.isActive())
We don't do this in our sample test 
(http://wiki.apache.org/jdo/SampleTest), which is supposed to be a model 
of excellence.  Is it a good idea or not?

-- Michelle

View raw message