« Return to Thread: Best practice issues...

Best practice issues...

by nielsene-2 :: Rate this Message:

Reply to Author | View in Thread

I've been having difficulties getting stable testing infrastructure working with
the rest of my application.

Specifically, I'm running into foreign key problems.  Yes, I've head the docs
and FAQs.

In one version of my configuration, I'm using hand coded SQL with most, but not
all of the "on-delete"s set to cascade.  I have dbunit's setup configured to
use CLEAN_INSERT.  Under this version, everything seems to work.

I'd like to use hibernates hbm2ddl.auto feature, at least during the early
development, rapid DDL churn phase of the project.  When I enable hmb2ddl.auto,
and proceed, I get foreign key exceptions during the setup of a test case, as
part of CLEAN_INSERT.  I haven't tested, but plan to later this week, what
happens under the original configuration is I set all the on-delete's to
RESTRICT.  I suspect the errors will occur here as well.

I could switch to doing the database cleanup in the teardown, but the dbunit
documentation tends to push the CLEAN_INSERT setup and the do-nothing teardown
and I tend to agree with the reasons given.

Are there other options or approaches I should look at?

Thank you.
Eric Nielsen

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

 « Return to Thread: Best practice issues...

LightInTheBox - Buy quality products at wholesale price!