aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src/test
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-06-18 11:17:11 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-06-18 11:17:20 +0200
commitc1903b898f440e042a65555bed7a09324fbf3f33 (patch)
treeb59ffd19afd3ab282b15fd8d284c9d3bea253ea0 /sonar-core/src/test
parentec39e6cc130b955fa510cc5a143679502eedde70 (diff)
downloadsonarqube-c1903b898f440e042a65555bed7a09324fbf3f33.tar.gz
sonarqube-c1903b898f440e042a65555bed7a09324fbf3f33.zip
SONAR-3755 Revert usage of "or" in favour of "in" in SQL used to get issues by id
Diffstat (limited to 'sonar-core/src/test')
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java
index a792176d525..035fc1a636a 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java
@@ -305,6 +305,20 @@ public class IssueDaoTest extends AbstractDaoTestCase {
assertThat(results).hasSize(3);
}
+ @Test
+ public void should_select_by_ids_with_huge_number_of_ids() {
+ setupData("shared");
+
+ List<Long> hugeNbOfIssues = newArrayList();
+ for (long i=0; i<1500; i++) {
+ hugeNbOfIssues.add(i);
+ }
+ List<IssueDto> results = dao.selectByIds(hugeNbOfIssues);
+
+ // The goal of this test is only to check that the query do no fail, not to check the number of results
+ assertThat(results).isEmpty();
+ }
+
private List<Long> getIssueIds(List<IssueDto> issues) {
return newArrayList(Iterables.transform(issues, new Function<IssueDto, Long>() {
@Override