aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-es
diff options
context:
space:
mode:
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>2023-05-25 15:21:09 +0200
committersonartech <sonartech@sonarsource.com>2023-06-01 20:02:59 +0000
commitaa08b062fe0ad882f7da840e8a6eb01bcc87b4e1 (patch)
treee3f3b9bc943fa48a0a29d94c5c864ce404ea4d3c /server/sonar-webserver-es
parent7b73b663030d67ddf6cf01914379f1c5a671bdf6 (diff)
downloadsonarqube-aa08b062fe0ad882f7da840e8a6eb01bcc87b4e1.tar.gz
sonarqube-aa08b062fe0ad882f7da840e8a6eb01bcc87b4e1.zip
SONAR-18856 fixed elasticsearch scoring tests
Diffstat (limited to 'server/sonar-webserver-es')
-rw-r--r--server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexScoreTest.java7
-rw-r--r--server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java1
2 files changed, 0 insertions, 8 deletions
diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexScoreTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexScoreTest.java
index e911826d01f..cf49942126f 100644
--- a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexScoreTest.java
+++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexScoreTest.java
@@ -19,22 +19,15 @@
*/
package org.sonar.server.component.index;
-import com.google.common.collect.ImmutableSet;
import java.util.List;
import java.util.Set;
import org.junit.Test;
-import org.sonar.db.component.ComponentDto;
-import org.sonar.db.component.ComponentTesting;
import org.sonar.db.project.ProjectDto;
import org.sonar.server.es.textsearch.ComponentTextSearchFeatureRepertoire;
-import static java.util.Arrays.asList;
-import static org.sonar.api.resources.Qualifiers.DIRECTORY;
-import static org.sonar.api.resources.Qualifiers.FILE;
import static org.sonar.api.resources.Qualifiers.PROJECT;
public class ComponentIndexScoreTest extends ComponentIndexTest {
-
@Test
public void should_prefer_components_without_prefix() {
assertResultOrder("File.java",
diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java
index 41c8abcaa1e..2f392e5792b 100644
--- a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java
+++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java
@@ -59,7 +59,6 @@ public abstract class ComponentIndexTest {
private final ComponentDbTester componentDbTester = new ComponentDbTester(db);
protected void assertResultOrder(String query, String... resultsInOrder) {
- indexProject("key-1", "Quality Product");
List<ProjectDto> projects = Arrays.stream(resultsInOrder)
.map(r -> componentDbTester.insertPublicProject(c -> c.setName(r)).getProjectDto())
.toList();