I am writing unit tests using DBUnit to test DAO layer of my project. It usesJDBC to connect to the database.
I am using in memory database HQLDB with DBUnit.
Every time I execute my tests, I notice database.log, datbase.properties and database.script being generated.
How can I prevent DBUnit from generating these files?
dbUnit does not generate those files.
Databases such as HSQLDB, H2, and Derby create them for persisting the data changes.
Usually there is a switch to start them in "in-memory" mode only so they don't create those files, usually in the database connection URL. Here is the info for doing so with HSQLDB: http://hsqldb.org/doc/guide/ch01.html#N101CA
(It's the "Memory-Only Databases" section on the http://hsqldb.org/doc/guide/ch01.html page)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.