aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-es
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2022-03-31 17:10:01 +0200
committersonartech <sonartech@sonarsource.com>2022-03-31 20:02:59 +0000
commit171cc1e06ec0a10cf2383184c1441db985698858 (patch)
tree40623385ccf68c9e158362e84c2d7ff8dc600501 /server/sonar-webserver-es
parent741348e03f0a71bb8d9295cddaf4502a2174ce72 (diff)
downloadsonarqube-171cc1e06ec0a10cf2383184c1441db985698858.tar.gz
sonarqube-171cc1e06ec0a10cf2383184c1441db985698858.zip
Fix Elasticsearch UT failing do incorrect order
whne pruning data for each test case ES is performing soft deletes, which can affect query score results, recreating indexes fixes that problem
Diffstat (limited to 'server/sonar-webserver-es')
-rw-r--r--server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexScoreTest.java1
1 files changed, 1 insertions, 0 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 8c7a547251e..3fbf4f34622 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
@@ -48,6 +48,7 @@ public class ComponentIndexScoreTest extends ComponentIndexTest {
@Test
public void should_prefer_key_matching_over_name_matching() {
+ es.recreateIndexes();
ComponentDto project1 = indexProject("quality", "SonarQube");
ComponentDto project2 = indexProject("sonarqube", "Quality Product");