mvoase
mvoase

Reputation: 574

DBUnit Rollback After Test

Anybody know how to use transactional rollbacks on a DBUnit test.

Everywhere I have looked only uses SprintJUnitClassRunner.

However my tests run with

@Runwith(Junit4.class)

I basically need to rollback the DB once the test has finished.

Upvotes: 2

Views: 1113

Answers (1)

Jeff
Jeff

Reputation: 953

dbUnit's purpose is to cleanup the database tables before and after the test runs, so rolling back the transaction isn't necessary. Refer to DatabaseOperation for the options.

Upvotes: 1

Related Questions