diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-11-06 18:50:48 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-11-06 18:50:59 +0100 |
commit | 9c9df89f55d17bf6fa353b1d5cb4cd394402b40a (patch) | |
tree | e19ff89157bd44f498aa1de7acc8d7a09147b95d /sonar-core | |
parent | 928ec8c0eaca32115ccf0b1ffac129730af9a00d (diff) | |
download | sonarqube-9c9df89f55d17bf6fa353b1d5cb4cd394402b40a.tar.gz sonarqube-9c9df89f55d17bf6fa353b1d5cb4cd394402b40a.zip |
Speed-up db tests
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/persistence/AbstractDaoTestCase.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/AbstractDaoTestCase.java b/sonar-core/src/test/java/org/sonar/core/persistence/AbstractDaoTestCase.java index e9689e311d1..f4a45af0681 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/AbstractDaoTestCase.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/AbstractDaoTestCase.java @@ -68,7 +68,7 @@ public abstract class AbstractDaoTestCase { private static final Logger LOG = LoggerFactory.getLogger(AbstractDaoTestCase.class); private static Database database; private static DatabaseCommands databaseCommands; - private MyBatis myBatis; + private static MyBatis myBatis; private IDatabaseTester databaseTester; @@ -91,6 +91,9 @@ public abstract class AbstractDaoTestCase { database.start(); LOG.info("Test Database: " + database); databaseCommands = DatabaseCommands.forDialect(database.getDialect()); + + myBatis = new MyBatis(database, new Logback(), new NullQueue()); + myBatis.start(); } } @@ -98,8 +101,6 @@ public abstract class AbstractDaoTestCase { public void startDbUnit() throws Exception { databaseCommands.truncateDatabase(database.getDataSource()); databaseTester = new DataSourceDatabaseTester(database.getDataSource()); - myBatis = new MyBatis(database, new Logback(), new NullQueue()); - myBatis.start(); } /** |