diff --git a/muted-tests.yml b/muted-tests.yml index e0c8aae20ba70..58f39102eee1d 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -357,9 +357,6 @@ tests: - class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT method: testSearchWithRandomDisconnects issue: https://github.com/elastic/elasticsearch/issues/122707 -- class: org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT - method: testDeletionOfFailingToRecoverIndexShouldStopRestore - issue: https://github.com/elastic/elasticsearch/issues/126204 - class: org.elasticsearch.xpack.esql.inference.RerankOperatorTests method: testSimpleCircuitBreaking issue: https://github.com/elastic/elasticsearch/issues/124337 diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java index 4dd63915467c3..10e0d997bf272 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java @@ -748,7 +748,7 @@ public void testDeletionOfFailingToRecoverIndexShouldStopRestore() throws Except logger.info("--> wait for the index to appear"); // that would mean that recovery process started and failing - waitForIndex("test-idx", TimeValue.timeValueSeconds(10)); + safeGet(clusterAdmin().prepareHealth(SAFE_AWAIT_TIMEOUT, "test-idx").execute()); logger.info("--> delete index"); cluster().wipeIndices("test-idx"); @@ -1619,14 +1619,6 @@ public void testDeleteSnapshotWhileRestoringFails() throws Exception { restoreFut.get(); } - private void waitForIndex(final String index, TimeValue timeout) throws Exception { - assertBusy( - () -> assertTrue("Expected index [" + index + "] to exist", indexExists(index)), - timeout.millis(), - TimeUnit.MILLISECONDS - ); - } - public void testSnapshotName() throws Exception { disableRepoConsistencyCheck("This test does not create any data in the repository");