From fd087b641e2586485e8d8c3e3c1a9913b2a2c403 Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Fri, 16 Sep 2022 11:41:45 -0700 Subject: [PATCH] Fix spotless failures Signed-off-by: Suraj Singh --- .../opensearch/snapshots/SegmentReplicationSnapshotIT.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/SegmentReplicationSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SegmentReplicationSnapshotIT.java index 193b28af6d0de..8762fdb937922 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/SegmentReplicationSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SegmentReplicationSnapshotIT.java @@ -48,7 +48,7 @@ public class SegmentReplicationSnapshotIT extends AbstractSnapshotIntegTestCase @BeforeClass public static void assumeFeatureFlag() { -// assumeTrue("Segment replication Feature flag is enabled", Boolean.parseBoolean(System.getProperty(FeatureFlags.REPLICATION_TYPE))); + assumeTrue("Segment replication Feature flag is enabled", Boolean.parseBoolean(System.getProperty(FeatureFlags.REPLICATION_TYPE))); } public Settings segRepEnableIndexSettings() { @@ -151,8 +151,7 @@ public void testRestoreOnSegRep() throws Exception { startClusterWithSettings(segRepEnableIndexSettings(), 1); createSnapshot(); // Delete index - client().admin().indices().delete(new DeleteIndexRequest(INDEX_NAME)); - Thread.sleep(5000); + assertAcked(client().admin().indices().delete(new DeleteIndexRequest(INDEX_NAME)).get()); assertFalse("index [" + INDEX_NAME + "] should have been deleted", indexExists(INDEX_NAME)); logger.info("Restore from snapshot");