Skip to content

Commit 18b4540

Browse files
authored
[Tests] Limit IOUtilTests on Windows (elastic#124716) (elastic#124729)
On Windows read-only directories where files cannot be stored are not supported. It makes this test irrelevant for this OS.
1 parent 003d9f0 commit 18b4540

File tree

1 file changed

+3
-0
lines changed
  • test/test-clusters/src/test/java/org/elasticsearch/test/cluster/util

1 file changed

+3
-0
lines changed

test/test-clusters/src/test/java/org/elasticsearch/test/cluster/util/IOUtilsTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
package org.elasticsearch.test.cluster.util;
1111

12+
import org.junit.Assume;
1213
import org.junit.Test;
1314

1415
import java.io.IOException;
@@ -56,6 +57,8 @@ private void assertFileExists(Path path) throws IOException {
5657

5758
@Test
5859
public void testSyncWithLinksThrowExceptionWhenDestinationIsNotWritable() throws IOException {
60+
Assume.assumeFalse("On Windows read-only directories are not supported", OS.current() == OS.WINDOWS);
61+
5962
// given
6063
Path sourceDir = Files.createTempDirectory("sourceDir");
6164
Files.createFile(sourceDir.resolve("file1.txt"));

0 commit comments

Comments
 (0)