springtestdbunit / spring-test-dbunit

Integration between the Spring testing framework and DBUnit
http://springtestdbunit.github.com/spring-test-dbunit/
Apache License 2.0
475 stars 238 forks source link

Hibernate Temporary table #108

Open maxSII opened 8 years ago

maxSII commented 8 years ago

Hello, Thanks for the project.

Unfortunataly, I'm having a problem with hibernate temp table. I use @DatabaseSetUp to load a unique "SITE" table with unique line.

My unit test update this ligne.

Then I'm checking the data with @ExpectedDatabase and a file containing 1 table and 1 row.

The problem is when dbunit check how many tables are present against how many should be, all hibernate temporary table are present but not in my expected data file.

Is there a way to ignore those temporary tables?

Thans a lot.

Maxime

FingolfinTEK commented 8 years ago

You should use a non-strict assertion mode - it will only check the tables in your dataset, like so: @ExpectedDatabase(value = "/path/to/dataset.xml", assertionMode = DatabaseAssertionMode.NON_STRICT)