diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-01-15 19:08:09 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-01-15 19:08:20 +0100 |
commit | b23521346f3a2e60f96417b4196448b86f801413 (patch) | |
tree | 3c9ed2e457a42eef79d92e023276ccb7d96a3acb /sonar-core | |
parent | eee67d858e54897e03090ab87839eec39b8e2454 (diff) | |
download | sonarqube-b23521346f3a2e60f96417b4196448b86f801413.tar.gz sonarqube-b23521346f3a2e60f96417b4196448b86f801413.zip |
Fix test on Postgres
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java index 997f4a91f3f..4c661e119cb 100644 --- a/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java @@ -20,6 +20,7 @@ package org.sonar.core.rule; import com.google.common.collect.ImmutableList; +import org.apache.ibatis.session.SqlSession; import org.junit.Before; import org.junit.Test; import org.sonar.api.rules.Rule; @@ -83,7 +84,10 @@ public class RuleDaoTest extends AbstractDaoTestCase { @Test public void testSelectNonManual() throws Exception { setupData("selectNonManual"); - List<RuleDto> ruleDtos = dao.selectNonManual(getMyBatis().openSession()); + SqlSession session = getMyBatis().openSession(); + List<RuleDto> ruleDtos = dao.selectNonManual(session); + session.commit(); + session.close(); assertThat(ruleDtos.size()).isEqualTo(1); RuleDto ruleDto = ruleDtos.get(0); |