You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/10/05 10:02:33 UTC

lucene-solr:branch_6x: fix rare test bug

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 4b6794368 -> 8a113ba2f


fix rare test bug


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

Branch: refs/heads/branch_6x
Commit: 8a113ba2f401a3242c8c511e7f58266ce8f4a903
Parents: 4b67943
Author: Mike McCandless <mi...@apache.org>
Authored: Fri Sep 23 06:13:26 2016 -0400
Committer: Mike McCandless <mi...@apache.org>
Committed: Wed Oct 5 06:02:06 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/lucene/index/BasePointsFormatTestCase.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a113ba2/lucene/test-framework/src/java/org/apache/lucene/index/BasePointsFormatTestCase.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BasePointsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BasePointsFormatTestCase.java
index 5891df5..93dd55d 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BasePointsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BasePointsFormatTestCase.java
@@ -168,6 +168,11 @@ public abstract class BasePointsFormatTestCase extends BaseIndexFileFormatTestCa
     for(LeafReaderContext ctx : r.leaves()) {
       PointValues values = ctx.reader().getPointValues();
       NumericDocValues idValues = ctx.reader().getNumericDocValues("id");
+      if (idValues == null) {
+        // this is (surprisingly) OK, because if the random IWC flushes all 10 docs before the 11th doc is added, and force merge runs, it
+        // will drop the 100% deleted segments, and the "id" field never exists in the final single doc segment
+        continue;
+      }
       if (values != null) {
         BitSet seen = new BitSet();
         values.intersect("dim",