aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-10-22 15:55:15 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-10-22 15:55:15 +0200
commit006bd1f7108b528315cf7699efc8ef4110ef503f (patch)
tree3b32a021024880bfd3b00b230874f503ad715a8b /sonar-batch
parenta8e03360a82c53415fde082001a3f9dd3deff0b8 (diff)
downloadsonarqube-006bd1f7108b528315cf7699efc8ef4110ef503f.tar.gz
sonarqube-006bd1f7108b528315cf7699efc8ef4110ef503f.zip
SONAR-5753 Revert change on ComponentMapper
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
index 3c80b7237d3..3a805fb1d92 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
@@ -41,6 +41,7 @@ import javax.persistence.Query;
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.Arrays;
import static org.fest.assertions.Assertions.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -239,7 +240,8 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
enableSnapshot(1002);
SqlSession session = getMyBatis().openSession(false);
try {
- ComponentDto newLib = session.getMapper(ComponentMapper.class).selectByKey("junit:junit");
+ // FIXME selectByKey returns duplicates for libraries because of the join on snapshots table
+ ComponentDto newLib = session.getMapper(ComponentMapper.class).findByKeys(Arrays.asList("junit:junit")).get(0);
assertThat(newLib.uuid()).isNotNull();
assertThat(newLib.projectUuid()).isEqualTo(newLib.projectUuid());
assertThat(newLib.moduleUuid()).isNull();