Play Framework Deletes DB at Test Mode
We are using Play! framework in our project and testing our code with unit tests. With the same code all my records in the test database are deleted when I stop the Play server on the console but the dbs of my workmates are not deleted when they stop Play. How can we开发者_运维技巧 resolve this?
PS: I'm using ubuntu 11.04 and tried with play 1.2.1, 1.2.2 and 1.2.3
Check that you all have the same settings in application.conf. You may have JPA set up to "create-drop" on test, while they have it on "create". This would explain why the database is removed.
Do you use the same H2 database, you and your colleagues? H2 Mem DB or H2 FS?
If memory, it's normal that the DB is cleaned after tests because the DB in memory is released.
精彩评论