You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2019/06/11 19:33:14 UTC

[lucene-solr] branch master updated: LUCENE-8853: Temporarily disable random FileSwitchDirectory

This is an automated email from the ASF dual-hosted git repository.

simonw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new e6a9bfb  LUCENE-8853: Temporarily disable random FileSwitchDirectory
e6a9bfb is described below

commit e6a9bfb8b27ac3b45effdae8361c118645ae8a3b
Author: Simon Willnauer <si...@apache.org>
AuthorDate: Tue Jun 11 21:31:08 2019 +0200

    LUCENE-8853: Temporarily disable random FileSwitchDirectory
---
 .../src/java/org/apache/lucene/util/LuceneTestCase.java  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
index e5159a7..cd8d492 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
@@ -91,7 +91,6 @@ import org.apache.lucene.store.ByteBuffersDirectory;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.store.FSLockFactory;
-import org.apache.lucene.store.FileSwitchDirectory;
 import org.apache.lucene.store.FlushInfo;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.LockFactory;
@@ -1415,13 +1414,14 @@ public abstract class LuceneTestCase extends Assert {
       }
 
       Directory fsdir = newFSDirectoryImpl(clazz, f, lf);
-      if (rarely()) {
-        List<String> fileExtensions =
-            Arrays.asList("fdt", "fdx", "tim", "tip", "si", "fnm", "pos", "dii", "dim", "nvm", "nvd", "dvm", "dvd");
-        Collections.shuffle(fileExtensions, random());
-        fileExtensions = fileExtensions.subList(0, 1 + random().nextInt(fileExtensions.size()));
-        fsdir = new FileSwitchDirectory(new HashSet<>(fileExtensions), fsdir, newFSDirectoryImpl(clazz, f, lf), true);
-      }
+// LUCENE-8853: FileSwitchDirectory is broken for tmp outputs.
+//      if (rarely()) {
+//        List<String> fileExtensions =
+//            Arrays.asList("fdt", "fdx", "tim", "tip", "si", "fnm", "pos", "dii", "dim", "nvm", "nvd", "dvm", "dvd");
+//        Collections.shuffle(fileExtensions, random());
+//        fileExtensions = fileExtensions.subList(0, 1 + random().nextInt(fileExtensions.size()));
+//        fsdir = new FileSwitchDirectory(new HashSet<>(fileExtensions), fsdir, newFSDirectoryImpl(clazz, f, lf), true);
+//      }
       BaseDirectoryWrapper wrapped = wrapDirectory(random(), fsdir, bare);
       return wrapped;
     } catch (Exception e) {