From 845ee414844bca48c8d0d43dc2e65eed4e91ebdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dharmesh=20=F0=9F=92=A4?= Date: Wed, 6 Sep 2023 16:01:10 +0530 Subject: [PATCH] [Remote Store] Fixing flaky test - RemoteIndexPrimaryRelocationIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dharmesh 💤 --- .../remotestore/RemoteIndexPrimaryRelocationIT.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java index b45b19c43b3b3..9a7fa76808d20 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java @@ -26,11 +26,10 @@ public class RemoteIndexPrimaryRelocationIT extends IndexPrimaryRelocationIT { protected Path absolutePath; - public void setup() { - absolutePath = randomRepoPath().toAbsolutePath(); - } - protected Settings nodeSettings(int nodeOrdinal) { + if (absolutePath == null) { + absolutePath = randomRepoPath().toAbsolutePath(); + } return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(remoteStoreClusterSettings(REPOSITORY_NAME, absolutePath))