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 2013/07/25 22:42:50 UTC

svn commit: r1507118 - /lucene/dev/branches/lucene5127/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java

Author: mikemccand
Date: Thu Jul 25 20:42:49 2013
New Revision: 1507118

URL: http://svn.apache.org/r1507118
Log:
LUCENE-5127: fix false fail when terms dict is a ghostbuster

Modified:
    lucene/dev/branches/lucene5127/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java

Modified: lucene/dev/branches/lucene5127/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5127/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java?rev=1507118&r1=1507117&r2=1507118&view=diff
==============================================================================
--- lucene/dev/branches/lucene5127/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java (original)
+++ lucene/dev/branches/lucene5127/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java Thu Jul 25 20:42:49 2013
@@ -1197,8 +1197,9 @@ public abstract class BasePostingsFormat
     DirectoryReader ir = iw.getReader();
     AtomicReader ar = getOnlySegmentReader(ir);
     Fields fields = ar.fields();
-    assertTrue(fields.size() == 1);
-    Terms terms = ar.terms("ghostField");
+    // Ghost busting terms dict impls will have
+    // fields.size() == 0; all others must be == 1:
+    assertTrue(fields.size() <= 1);
     if (terms != null) {
       TermsEnum termsEnum = terms.iterator(null);
       BytesRef term = termsEnum.next();