mirror of https://github.com/apache/lucene.git
LUCENE-8853: Temporarily disable random FileSwitchDirectory
This commit is contained in:
parent
b6c68ccded
commit
e6a9bfb8b2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue