lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [29/42] lucene-solr:jira/solr-8593: LUCENE-7574: Fix more index sorting test failures.
Date Mon, 28 Nov 2016 17:26:58 GMT
LUCENE-7574: Fix more index sorting test failures.


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

Branch: refs/heads/jira/solr-8593
Commit: d0b5d41f5c44aa04ea88fa40dbed456e090339e6
Parents: 9b4b120
Author: Adrien Grand <jpountz@gmail.com>
Authored: Fri Nov 25 16:24:00 2016 +0100
Committer: Adrien Grand <jpountz@gmail.com>
Committed: Fri Nov 25 16:24:00 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d0b5d41f/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
index eb74ab7..5ebf8f4 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
@@ -103,7 +103,10 @@ public class TestIndexSorting extends LuceneTestCase {
           return new PointsWriter() {
             @Override
             public void merge(MergeState mergeState) throws IOException {
-              assertEquals(needsIndexSort, mergeState.needsIndexSort);
+              // For single segment merge we cannot infer if the segment is already sorted
or not.
+              if (mergeState.docMaps.length > 1) {
+                assertEquals(needsIndexSort, mergeState.needsIndexSort);
+              }
               ++ numCalls;
               writer.merge(mergeState);
             }


Mime
View raw message