From 817eb28de4ed8d48a9e7a5364ef0f84cf160eda0 Mon Sep 17 00:00:00 2001 From: Lukasz Jarocki Date: Thu, 31 Mar 2022 16:53:03 +0200 Subject: [PATCH] Testing fix, ignore please --- .../src/testFixtures/java/org/sonar/server/es/EsTester.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java b/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java index 5ce592554f6..cf419951348 100644 --- a/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java +++ b/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java @@ -45,6 +45,7 @@ import org.apache.http.HttpHost; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; +import org.elasticsearch.action.admin.indices.flush.FlushRequest; import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest; import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest; import org.elasticsearch.action.bulk.BulkRequest; @@ -181,6 +182,11 @@ public class EsTester extends ExternalResource { } deleteAllDocumentsInIndexes(); + try { + ES_REST_CLIENT.nativeClient().indices().flush(new FlushRequest(ALL_INDICES.getName()), RequestOptions.DEFAULT); + } catch (IOException e) { + e.printStackTrace(); + } } private void deleteAllDocumentsInIndexes() { -- 2.39.5