Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-8835: Irony - our tests don't emulate windows well enough

Simon Willnauer608d9134ad51
diff --git a/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java b/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
index 031d5eb8872..256ee1b871b 100644
--- a/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
+++ b/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
@@ -37,6 +37,7 @@ import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.TestIndexWriterReader;
import org.apache.lucene.mockfile.FilterPath;
import org.apache.lucene.mockfile.WindowsFS;
+import org.apache.lucene.util.Constants;
import org.apache.lucene.util.TestUtil;
public class TestFileSwitchDirectory extends BaseDirectoryTestCase {
@@ -140,6 +141,7 @@ public class TestFileSwitchDirectory extends BaseDirectoryTestCase {
public void testDeleteAndList() throws IOException {
// relies on windows semantics
Path path = createTempDir();
+ assumeFalse("Irony we seem to not emulate windows well enough", Constants.WINDOWS);
FileSystem fs = new WindowsFS(path.getFileSystem()).getFileSystem(URI.create("file:///"));
Path indexPath = new FilterPath(path, fs);
try (final FileSwitchDirectory dir = new FileSwitchDirectory(Collections.singleton("tim"),