diff --git a/muted-tests.yml b/muted-tests.yml index 6c480c7fbc9b7..d6dd744fc5248 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -239,9 +239,6 @@ tests: - class: org.elasticsearch.packaging.test.DockerTests method: test012SecurityCanBeDisabled issue: https://github.com/elastic/elasticsearch/issues/116636 -- class: org.elasticsearch.index.shard.StoreRecoveryTests - method: testAddIndices - issue: https://github.com/elastic/elasticsearch/issues/124104 - class: org.elasticsearch.smoketest.MlWithSecurityIT method: test {yaml=ml/data_frame_analytics_crud/Test get stats on newly created config} issue: https://github.com/elastic/elasticsearch/issues/121726 diff --git a/server/src/test/java/org/elasticsearch/index/shard/StoreRecoveryTests.java b/server/src/test/java/org/elasticsearch/index/shard/StoreRecoveryTests.java index bc3b44b908246..18240fa24414b 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/StoreRecoveryTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/StoreRecoveryTests.java @@ -44,7 +44,6 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.attribute.BasicFileAttributes; import java.util.Arrays; import java.util.Map; import java.util.function.Predicate; @@ -254,12 +253,7 @@ public boolean hardLinksSupported(Path path) throws IOException { try { Files.createFile(path.resolve("foo.bar")); Files.createLink(path.resolve("test"), path.resolve("foo.bar")); - BasicFileAttributes destAttr = Files.readAttributes(path.resolve("test"), BasicFileAttributes.class); - BasicFileAttributes sourceAttr = Files.readAttributes(path.resolve("foo.bar"), BasicFileAttributes.class); - // we won't get here - no permission ;) - return destAttr.fileKey() != null && destAttr.fileKey().equals(sourceAttr.fileKey()); - } catch (SecurityException ex) { - return true; // if we run into that situation we know it's supported. + return true; // createLink returning without exception means hard links are supported } catch (UnsupportedOperationException ex) { return false; }