You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2018/04/18 15:46:18 UTC

lucene-solr:branch_7x: [TEST] Ensure IW doesn't autoflush since test relies on it producing a single segment

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 46f71e8ae -> 699fc882f


[TEST] Ensure IW doesn't autoflush since test relies on it producing a single segment


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

Branch: refs/heads/branch_7x
Commit: 699fc882f870a0955a21e244ebfe36ab88da7cbd
Parents: 46f71e8a
Author: Simon Willnauer <si...@apache.org>
Authored: Wed Apr 18 17:45:55 2018 +0200
Committer: Simon Willnauer <si...@apache.org>
Committed: Wed Apr 18 17:46:07 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/699fc882/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 eac4388..9878b16 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestPendingSoftDeletes.java
@@ -152,7 +152,10 @@ public class TestPendingSoftDeletes extends TestPendingDeletes {
 
   public void testUpdateAppliedOnlyOnce() throws IOException {
     Directory dir = newDirectory();
-    IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig().setSoftDeletesField("_soft_deletes"));
+    IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig()
+        .setSoftDeletesField("_soft_deletes")
+        .setMaxBufferedDocs(3) // make sure we write one segment
+        .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,