Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

don't mock windows on windows

Robert Muircddb06dde3b1
diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleTemporaryFilesCleanup.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleTemporaryFilesCleanup.java
index 030e624df98..78131d6e366 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleTemporaryFilesCleanup.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleTemporaryFilesCleanup.java
@@ -124,7 +124,10 @@ final class TestRuleTemporaryFilesCleanup extends TestRuleAdapter {
fs = new HandleLimitFS(fs, MAX_OPEN_FILES).getFileSystem(null);
// windows is currently slow
if (random.nextInt(10) == 0) {
- fs = new WindowsFS(fs).getFileSystem(null);
+ // don't try to emulate windows on windows: they don't get along
+ if (!Constants.WINDOWS) {
+ fs = new WindowsFS(fs).getFileSystem(null);
+ }
}
}
if (LuceneTestCase.VERBOSE) {