db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karan Malhi <karan.ma...@gmail.com>
Subject Re: Cleanup in models.fieldtypes.Test*.java
Date Thu, 22 Sep 2005 00:13:06 GMT
Hi Michelle,

I agree. jdo.tck.cleanupaftertest is not effective in this case.

On 9/21/05, Michelle Caisse <Michelle.Caisse@sun.com> wrote:
>
> Hi,
>
> 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,
>
> http://svn.apache.org/viewcvs.cgi/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfPrimitiveboolean.java?view=markup)
> 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())
> tx.rollback();
> }
> 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
>



--
Karan Malhi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message