mirror of https://github.com/apache/lucene.git
Add assume to test since it only works with mmap directory
This commit is contained in:
parent
6222abf448
commit
65e1b3ef2a
|
@ -40,6 +40,7 @@ import org.apache.lucene.index.LeafReaderContext;
|
|||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.store.ByteArrayDataInput;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.FSDirectory;
|
||||
import org.apache.lucene.store.IOContext;
|
||||
import org.apache.lucene.store.IndexInput;
|
||||
import org.apache.lucene.store.IndexOutput;
|
||||
|
@ -60,7 +61,8 @@ public class TestBlockPostingsFormat extends BasePostingsFormatTestCase {
|
|||
|
||||
public void testFstOffHeap() throws IOException {
|
||||
Path tempDir = createTempDir();
|
||||
try (Directory d = MMapDirectory.open(tempDir)) {
|
||||
try (Directory d = FSDirectory.open(tempDir)) {
|
||||
assumeTrue("only works with mmap directory", d instanceof MMapDirectory);
|
||||
try (IndexWriter w = new IndexWriter(d, new IndexWriterConfig(new MockAnalyzer(random())))) {
|
||||
DirectoryReader readerFromWriter = DirectoryReader.open(w);
|
||||
for (int i = 0; i < 50; i++) {
|
||||
|
|
Loading…
Reference in New Issue