diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-11-05 11:51:27 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-11-05 11:51:27 +0100 |
commit | d0d187a678045351c968faa5c711ec6b1e203b71 (patch) | |
tree | 6cf4cbf9a39ba051b7b5ff2e52717c3e215d17b2 /sonar-core/src | |
parent | 78dafda3fd778f79b582bab04d394b237f261d00 (diff) | |
download | sonarqube-d0d187a678045351c968faa5c711ec6b1e203b71.tar.gz sonarqube-d0d187a678045351c968faa5c711ec6b1e203b71.zip |
Attempt to stabilize mysql tests
Diffstat (limited to 'sonar-core/src')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/persistence/AbstractDaoTestCase.java | 7 |
1 files changed, 3 insertions, 4 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 507077e4ce6..6052700cbf8 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 @@ -37,7 +37,6 @@ import org.dbunit.dataset.ITable; import org.dbunit.dataset.ReplacementDataSet; import org.dbunit.dataset.filter.DefaultColumnFilter; import org.dbunit.dataset.xml.FlatXmlDataSet; -import org.dbunit.ext.mssql.InsertIdentityOperation; import org.dbunit.ext.mysql.MySqlMetadataHandler; import org.dbunit.operation.DatabaseOperation; import org.junit.Assert; @@ -51,6 +50,7 @@ import org.sonar.core.config.Logback; import org.sonar.core.persistence.dialect.MySql; import javax.sql.DataSource; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -117,7 +117,6 @@ public abstract class AbstractDaoTestCase { } else { databaseTester = new MyDBTester(database.getDataSource()); } - myBatis = new MyBatis(database, new Logback(), queue); myBatis.start(); } @@ -203,8 +202,8 @@ public abstract class AbstractDaoTestCase { dataSets[i] = getData(dataSetStream[i]); } databaseTester.setDataSet(new CompositeDataSet(dataSets)); - - new InsertIdentityOperation(DatabaseOperation.INSERT).execute(connection, databaseTester.getDataSet()); + databaseTester.setSetUpOperation(DatabaseOperation.INSERT); + databaseTester.onSetup(); } catch (Exception e) { throw translateException("Could not setup DBUnit data", e); } |