mirror of https://github.com/apache/lucene.git
LUCENE-5708: fix these tests to also 'mimic' previous IWC.clone
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1598543 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4125c7682e
commit
98a527731d
|
@ -1093,6 +1093,7 @@ public class TestBinaryDocValuesUpdates extends LuceneTestCase {
|
|||
|
||||
// change format
|
||||
conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
|
||||
conf.setMergePolicy(NoMergePolicy.INSTANCE); // disable merges to simplify test assertions.
|
||||
conf.setCodec(new Lucene46Codec() {
|
||||
@Override
|
||||
public DocValuesFormat getDocValuesFormatForField(String field) {
|
||||
|
@ -1369,6 +1370,10 @@ public class TestBinaryDocValuesUpdates extends LuceneTestCase {
|
|||
|
||||
NRTCachingDirectory cachingDir = new NRTCachingDirectory(dir, 100, 1/(1024.*1024.));
|
||||
conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
|
||||
// we want a single large enough segment so that a doc-values update writes a large file
|
||||
conf.setMergePolicy(NoMergePolicy.INSTANCE);
|
||||
conf.setMaxBufferedDocs(Integer.MAX_VALUE); // manually flush
|
||||
conf.setRAMBufferSizeMB(IndexWriterConfig.DISABLE_AUTO_FLUSH);
|
||||
writer = new IndexWriter(cachingDir, conf);
|
||||
writer.updateBinaryDocValue(new Term("id", "doc-0"), "val", toBytes(100L));
|
||||
DirectoryReader reader = DirectoryReader.open(writer, true); // flush
|
||||
|
|
|
@ -1075,6 +1075,7 @@ public class TestNumericDocValuesUpdates extends LuceneTestCase {
|
|||
|
||||
// change format
|
||||
conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
|
||||
conf.setMergePolicy(NoMergePolicy.INSTANCE); // disable merges to simplify test assertions.
|
||||
conf.setCodec(new Lucene46Codec() {
|
||||
@Override
|
||||
public DocValuesFormat getDocValuesFormatForField(String field) {
|
||||
|
@ -1352,6 +1353,10 @@ public class TestNumericDocValuesUpdates extends LuceneTestCase {
|
|||
|
||||
NRTCachingDirectory cachingDir = new NRTCachingDirectory(dir, 100, 1/(1024.*1024.));
|
||||
conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
|
||||
// we want a single large enough segment so that a doc-values update writes a large file
|
||||
conf.setMergePolicy(NoMergePolicy.INSTANCE);
|
||||
conf.setMaxBufferedDocs(Integer.MAX_VALUE); // manually flush
|
||||
conf.setRAMBufferSizeMB(IndexWriterConfig.DISABLE_AUTO_FLUSH);
|
||||
writer = new IndexWriter(cachingDir, conf);
|
||||
writer.updateNumericDocValue(new Term("id", "doc-0"), "val", 100L);
|
||||
DirectoryReader reader = DirectoryReader.open(writer, true); // flush
|
||||
|
|
Loading…
Reference in New Issue