Skip to content

Apache Lucene open-source search software

Disable WindowsFS dependent tests in TestSimpleFSDirectory on Windows

Simon Willnauer85adac1c72c7
diff --git a/lucene/core/src/test/org/apache/lucene/store/TestSimpleFSDirectory.java b/lucene/core/src/test/org/apache/lucene/store/TestSimpleFSDirectory.java
index e550bcca5a9..15a26a0efda 100644
--- a/lucene/core/src/test/org/apache/lucene/store/TestSimpleFSDirectory.java
+++ b/lucene/core/src/test/org/apache/lucene/store/TestSimpleFSDirectory.java
@@ -24,6 +24,7 @@ import java.nio.file.Path;
import org.apache.lucene.mockfile.FilterPath;
import org.apache.lucene.mockfile.WindowsFS;
+import org.apache.lucene.util.Constants;
import org.apache.lucene.util.IOUtils;
/**
@@ -38,6 +39,8 @@ public class TestSimpleFSDirectory extends BaseDirectoryTestCase {
public void testRenameWithPendingDeletes() throws IOException {
Path path = createTempDir();
+ // irony: currently we don't emulate windows well enough to work on windows!
+ assumeFalse("windows is not supported", Constants.WINDOWS);
// Use WindowsFS to prevent open files from being deleted:
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));
Path root = new FilterPath(path, fs);
@@ -60,6 +63,8 @@ public class TestSimpleFSDirectory extends BaseDirectoryTestCase {
}
public void testCreateOutputWithPendingDeletes() throws IOException {
+ // irony: currently we don't emulate windows well enough to work on windows!
+ assumeFalse("windows is not supported", Constants.WINDOWS);
Path path = createTempDir();
// Use WindowsFS to prevent open files from being deleted:
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));