> While off topic, the ultimate time saver is to start a transaction in > setUp, never commit (only flush) in your testXxx method, and then > rollback in your tearDown. I first heard of this in the Rails > community, but now a Spring/Hibernate project I was on was > using/abusing it as well. I can appreciate the increased speed, but I'd > rather be completely sure my tests worked by committing the data and > then deleting it back out.
Yes that is something I have thought of as well. With Postgres even the CREATE TABLE would be rolled back :) But I agree with you: I don't think it's a valid test unless you commit your transaction - just think of deferrable constraints which are only evaluated at commit time. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
