From 171cc1e06ec0a10cf2383184c1441db985698858 Mon Sep 17 00:00:00 2001 From: Jacek Date: Thu, 31 Mar 2022 17:10:01 +0200 Subject: 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 --- .../java/org/sonar/server/component/index/ComponentIndexScoreTest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'server/sonar-webserver-es') 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"); -- cgit v1.2.3