aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-01-15 19:08:09 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-01-15 19:08:20 +0100
commitb23521346f3a2e60f96417b4196448b86f801413 (patch)
tree3c9ed2e457a42eef79d92e023276ccb7d96a3acb /sonar-core
parenteee67d858e54897e03090ab87839eec39b8e2454 (diff)
downloadsonarqube-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.java6
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);