IntegrationTestCase does not rollback transactions, causing test cases to have side effects

17 views
Skip to first unread message

Gregory Krasnow

unread,
Oct 3, 2012, 4:31:26 PM10/3/12
to grails-jax...@googlegroups.com
Under normal Grails development, Integration Tests would extend GroovyTestCase which causes every test to run in its own transaction and rollback the transaction at the end of the test.  This makes it easier on the developer since test cases are less likely to leave side effects this way.  However IntegrationTestCase seems to turn off transactions (static transactional = false) and does not seem to have a rollback mechanism.  Thus when testing POST, anything created remains and future tests can have unpredictable behavior.  Has anyone found a good way around this issue?  Thanks.
Reply all
Reply to author
Forward
0 new messages