mirror of https://github.com/apache/lucene.git
Disable WindowsFS dependent tests in TestSimpleFSDirectory on Windows
This commit is contained in:
parent
70cfe46689
commit
85adac1c72
|
@ -24,6 +24,7 @@ import java.nio.file.Path;
|
||||||
|
|
||||||
import org.apache.lucene.mockfile.FilterPath;
|
import org.apache.lucene.mockfile.FilterPath;
|
||||||
import org.apache.lucene.mockfile.WindowsFS;
|
import org.apache.lucene.mockfile.WindowsFS;
|
||||||
|
import org.apache.lucene.util.Constants;
|
||||||
import org.apache.lucene.util.IOUtils;
|
import org.apache.lucene.util.IOUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,6 +39,8 @@ public class TestSimpleFSDirectory extends BaseDirectoryTestCase {
|
||||||
|
|
||||||
public void testRenameWithPendingDeletes() throws IOException {
|
public void testRenameWithPendingDeletes() throws IOException {
|
||||||
Path path = createTempDir();
|
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:
|
// Use WindowsFS to prevent open files from being deleted:
|
||||||
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));
|
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));
|
||||||
Path root = new FilterPath(path, fs);
|
Path root = new FilterPath(path, fs);
|
||||||
|
@ -60,6 +63,8 @@ public class TestSimpleFSDirectory extends BaseDirectoryTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCreateOutputWithPendingDeletes() throws IOException {
|
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();
|
Path path = createTempDir();
|
||||||
// Use WindowsFS to prevent open files from being deleted:
|
// Use WindowsFS to prevent open files from being deleted:
|
||||||
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));
|
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));
|
||||||
|
|
Loading…
Reference in New Issue