You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2018/05/14 13:31:19 UTC

[2/2] lucene-solr:branch_7x: Fix TestPendingSoftDeletes.

Fix TestPendingSoftDeletes.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d691ced6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d691ced6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d691ced6

Branch: refs/heads/branch_7x
Commit: d691ced6310b6cd03357ec3ec2a68ecabc943fac
Parents: 92b4a93
Author: Adrien Grand <jp...@gmail.com>
Authored: Mon May 14 15:29:42 2018 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Mon May 14 15:31:06 2018 +0200

----------------------------------------------------------------------
 .../test/org/apache/lucene/index/TestPendingSoftDeletes.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d691ced6/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java b/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java
index 827c6e3..5fadd3f 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java
@@ -46,7 +46,11 @@ public class TestPendingSoftDeletes extends TestPendingDeletes {
 
   public void testDeleteSoft() throws IOException {
     Directory dir = newDirectory();
-    IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig().setSoftDeletesField("_soft_deletes"));
+    IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig()
+        .setSoftDeletesField("_soft_deletes")
+        // make sure all docs will end up in the same segment
+        .setMaxBufferedDocs(10)
+        .setRAMBufferSizeMB(IndexWriterConfig.DISABLE_AUTO_FLUSH));
     Document doc = new Document();
     doc.add(new StringField("id", "1", Field.Store.YES));
     writer.softUpdateDocument(new Term("id", "1"), doc,