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 2020/06/24 16:50:35 UTC
[lucene-solr] 06/07: ensure we actually apply the updates in the
test
This is an automated email from the ASF dual-hosted git repository.
simonw pushed a commit to branch jira/lucene-8962
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit d9b12a00ab82a993683788913092bf918367876e
Author: Simon Willnauer <si...@apache.org>
AuthorDate: Wed Jun 24 18:28:57 2020 +0200
ensure we actually apply the updates in the test
---
.../test/org/apache/lucene/index/TestIndexWriterMergePolicy.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java
index 1d78497..1c6ba26 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java
@@ -416,6 +416,12 @@ public class TestIndexWriterMergePolicy extends LuceneTestCase {
t.join();
try (DirectoryReader open = new SoftDeletesDirectoryReaderWrapper(DirectoryReader.open(directory), "soft_delete")) {
assertEquals(2, open.numDocs());
+ assertEquals("we should not have any deletes", 2, open.maxDoc());
+ }
+
+ try (DirectoryReader open = DirectoryReader.open(writer)) {
+ assertEquals(2, open.numDocs());
+ assertEquals("we should not have one delete", 3, open.maxDoc());
}
}
}