HHH-6020: keeping the in-memory database open for the duration of the JVM lifetime - so that the JTA tests pass - otherwise after creating the tables, all connections are closed before executing tests, which causes the DB to be cleared.

This commit is contained in:
adamw 2011-04-02 10:02:48 +02:00
parent 8ac8b87d8c
commit abf2d21279
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ public abstract class AbstractEntityTest extends AbstractEnversTest {
configValues.setProperty(Environment.USER, "sa"); configValues.setProperty(Environment.USER, "sa");
// Separate database for each test class // Separate database for each test class
configValues.setProperty(Environment.URL, "jdbc:h2:mem:" + this.getClass().getName()); configValues.setProperty(Environment.URL, "jdbc:h2:mem:" + this.getClass().getName() + ";DB_CLOSE_DELAY=-1");
if (auditStrategy != null && !"".equals(auditStrategy)) { if (auditStrategy != null && !"".equals(auditStrategy)) {
cfg.setProperty("org.hibernate.envers.audit_strategy", auditStrategy); cfg.setProperty("org.hibernate.envers.audit_strategy", auditStrategy);