[TEST] Prevent merges in simple tests that compare doc stats from IW

This commit is contained in:
Simon Willnauer 2018-11-22 14:20:29 +01:00
parent 67cdd21996
commit f7fa25069e
1 changed files with 3 additions and 1 deletions

View File

@ -3081,7 +3081,9 @@ public class TestIndexWriter extends LuceneTestCase {
public void testSoftUpdateDocuments() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig().setSoftDeletesField("soft_delete"));
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig()
.setMergePolicy(NoMergePolicy.INSTANCE)
.setSoftDeletesField("soft_delete"));
expectThrows(IllegalArgumentException.class, () -> {
writer.softUpdateDocument(null, new Document(), new NumericDocValuesField("soft_delete", 1));
});